diff options
| author | Carlo Vanini <silhusk@gmail.com> | 2016-03-03 00:27:49 (GMT) |
|---|---|---|
| committer | Carlo Vanini <silhusk@gmail.com> | 2016-03-03 00:28:33 (GMT) |
| commit | 465ca5fcf203fa190b90823907f358954b922f5f (patch) | |
| tree | 35d0d0ee7bfc47b3c6de97a9bc5314b26548d21c | |
| parent | a4a78eca9ad978cfbc28518e9905a06b78aec2a2 (diff) | |
Fix muon not closing with window close button.
The variable m_canExit was not initialized and did prevent muon from exiting
when closed from the window manager. Remove it because it is never changed and
remove canExit() because it is in the wrong place anyway to prevent exiting
while acting on packages. It should be in backend.
Testing Done:
* open muon close by clicking the X button in the window decoration or with
* Alt+F4
Closing with File -> Exit or Ctrl+Q does not call MainWindow::queryClose() and
therefore did always work.
REVIEW: 127249
BUG: 358659
| -rw-r--r-- | src/MainWindow.cpp | 2 | ||||
| -rw-r--r-- | src/muonapt/QAptActions.h | 4 |
2 files changed, 1 insertions, 5 deletions
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 466ea4b..9bcec05 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -355,7 +355,7 @@ void MainWindow::startCommit() bool MainWindow::queryClose() { - return !m_reloading && !m_managerWidget->isSortingPackages() && QAptActions::self()->canExit(); + return !m_reloading && !m_managerWidget->isSortingPackages(); } void MainWindow::reload() diff --git a/src/muonapt/QAptActions.h b/src/muonapt/QAptActions.h index 33db6e1..b71e4ad 100644 --- a/src/muonapt/QAptActions.h +++ b/src/muonapt/QAptActions.h @@ -55,9 +55,6 @@ public: void initError(); void displayTransactionError(QApt::ErrorCode error, QApt::Transaction* trans); KActionCollection* actionCollection(); - - void setCanExit(bool e) { m_canExit = e; } - bool canExit() const { return m_canExit; } signals: void shouldConnect(bool isConnected); @@ -103,7 +100,6 @@ private: QList<QAction *> m_actions; bool m_distUpgradeAvailable; QNetworkConfigurationManager* m_config; - bool m_canExit; }; |
