summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-04-11 00:05:55 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-04-11 00:05:55 +0900
commit232282cbf92bee9b3179da14507d97735372651a (patch)
tree5ef3affb8643d9041b6b3721b102aa4d9665bf8c
parent2d8b5af5068ad96b1729aefa3476c2df87084bb6 (diff)
downloadtdebase-232282cbf92bee9b3179da14507d97735372651a.tar.gz
tdebase-232282cbf92bee9b3179da14507d97735372651a.zip
Kate:
1) removed connection to inexistent slot 2) fix code to save Kate's session from TDE's session manager. This relates to bug 2691. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--kate/app/kateapp.cpp4
-rw-r--r--kate/app/katemainwindow.cpp20
2 files changed, 15 insertions, 9 deletions
diff --git a/kate/app/kateapp.cpp b/kate/app/kateapp.cpp
index c92d7cebc..57c274636 100644
--- a/kate/app/kateapp.cpp
+++ b/kate/app/kateapp.cpp
@@ -83,8 +83,6 @@ KateApp::KateApp (TDECmdLineArgs *args)
kdDebug()<<"Setting KATE_PID: '"<<getpid()<<"'"<<endl;
::setenv( "KATE_PID", TQString(TQString("%1").arg(getpid())).latin1(), 1 );
- connect(this, TQT_SIGNAL(aboutToQuit()), this, TQT_SLOT(slotAboutToQuit()));
-
// handle restore different
if (isRestored())
{
@@ -299,7 +297,7 @@ bool KateApp::startupKate()
void KateApp::shutdownKate(KateMainWindow *win)
{
- if (!win->queryClose_internal() || !query_session_close())
+ if (!win->queryClose_internal())
return;
// detach the dcopClient
diff --git a/kate/app/katemainwindow.cpp b/kate/app/katemainwindow.cpp
index 1e0a4b37d..298b455eb 100644
--- a/kate/app/katemainwindow.cpp
+++ b/kate/app/katemainwindow.cpp
@@ -345,23 +345,31 @@ bool KateMainWindow::queryClose_internal() {
uint documentCount=KateDocManager::self()->documents();
if ( !showModOnDiskPrompt() )
+ {
return false;
+ }
TQPtrList<Kate::Document> modifiedDocuments=KateDocManager::self()->modifiedDocumentList();
- bool shutdown=(modifiedDocuments.count()==0);
+ bool shutdown = (modifiedDocuments.count() == 0);
- if (!shutdown) {
- shutdown=KateSaveModifiedDialog::queryClose(this,modifiedDocuments);
+ if (!shutdown)
+ {
+ shutdown = KateSaveModifiedDialog::queryClose(this,modifiedDocuments);
}
if ( KateDocManager::self()->documents() > documentCount ) {
KMessageBox::information (this,
i18n ("New file opened while trying to close Kate, closing aborted."),
i18n ("Closing Aborted"));
- shutdown=false;
+ return false;
}
- return shutdown;
+ if (!shutdown)
+ {
+ return false;
+ }
+
+ return KateApp::self()->query_session_close();
}
/**
@@ -385,7 +393,7 @@ bool KateMainWindow::queryClose()
// last one: check if we can close all documents and sessions, try run
// and save docs if we really close down !
- if (queryClose_internal() && KateApp::self()->query_session_close())
+ if (queryClose_internal())
{
// detach the dcopClient
KateApp::self()->dcopClient()->detach();