View | Details | Raw Unified | Return to bug 20572
Collapse All | Expand All

(-)mainwindow.cc~ (-1 / +9 lines)
Lines 39-44 MainWindow::MainWindow( Config::Class & Link Here
39
  wordFinder( this ),
39
  wordFinder( this ),
40
  newReleaseCheckTimer( this )
40
  newReleaseCheckTimer( this )
41
{
41
{
42
  force_close = false;
42
  applyQtStyleSheet( cfg.preferences.displayStyle );
43
  applyQtStyleSheet( cfg.preferences.displayStyle );
43
44
44
  ui.setupUi( this );
45
  ui.setupUi( this );
Lines 270-275 MainWindow::MainWindow( Config::Class & Link Here
270
271
271
  prepareNewReleaseChecks();
272
  prepareNewReleaseChecks();
272
273
274
  connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()), this, SLOT(forceClose()));
275
273
  // makeDictionaries() didn't do deferred init - we do it here, at the end.
276
  // makeDictionaries() didn't do deferred init - we do it here, at the end.
274
  doDeferredInit( dictionaries );
277
  doDeferredInit( dictionaries );
275
}
278
}
Lines 356-362 void MainWindow::updateTrayIcon() Link Here
356
359
357
void MainWindow::closeEvent( QCloseEvent * ev )
360
void MainWindow::closeEvent( QCloseEvent * ev )
358
{
361
{
359
  if ( cfg.preferences.enableTrayIcon && cfg.preferences.closeToTray )
362
  if ( cfg.preferences.enableTrayIcon && cfg.preferences.closeToTray && !force_close )
360
  {
363
  {
361
    ev->ignore();
364
    ev->ignore();
362
    hide();
365
    hide();
Lines 1479-1481 void MainWindow::applyZoomFactor() Link Here
1479
  if ( scanPopup.get() )
1482
  if ( scanPopup.get() )
1480
    scanPopup->applyZoomFactor();
1483
    scanPopup->applyZoomFactor();
1481
}
1484
}
1485
1486
void MainWindow::forceClose()
1487
{
1488
    force_close = true;
1489
}
(-)mainwindow.hh~ (-1 / +2 lines)
Lines 34-40 public: Link Here
34
  ~MainWindow();
34
  ~MainWindow();
35
35
36
private:
36
private:
37
37
  bool force_close;
38
  QSystemTrayIcon * trayIcon;
38
  QSystemTrayIcon * trayIcon;
39
39
40
  Ui::MainWindow ui;
40
  Ui::MainWindow ui;
Lines 111-116 private: Link Here
111
private slots:
111
private slots:
112
112
113
  void hotKeyActivated( int );
113
  void hotKeyActivated( int );
114
  void forceClose();
114
115
115
  /// If new release checks are on, santizies the next check time and starts
116
  /// If new release checks are on, santizies the next check time and starts
116
  /// the timer. Does nothing otherwise.
117
  /// the timer. Does nothing otherwise.

Return to bug 20572