mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
reactivate session management
svn path=/trunk/KDE/kdebase/apps/; revision=717737
This commit is contained in:
parent
b45e2e92c5
commit
384ee037c2
23
src/main.cpp
23
src/main.cpp
|
@ -20,9 +20,12 @@
|
|||
|
||||
#include "dolphinapplication.h"
|
||||
|
||||
#include "dolphinmainwindow.h"
|
||||
|
||||
#include <kaboutdata.h>
|
||||
#include <kcmdlineargs.h>
|
||||
#include <klocale.h>
|
||||
#include <kmainwindow.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
@ -72,17 +75,21 @@ int main(int argc, char **argv)
|
|||
DolphinApplication app;
|
||||
KGlobal::locale()->insertCatalog("libkonq"); // needed for applications using libkonq
|
||||
|
||||
#ifdef __GNUC__
|
||||
#warning TODO, SessionManagement
|
||||
#endif
|
||||
#if 0
|
||||
if (false /* KDE4-TODO: app.isSessionRestored() */) {
|
||||
if (app.isSessionRestored()) {
|
||||
int n = 1;
|
||||
while (KMainWindow::canBeRestored(n)) {
|
||||
Dolphin::mainWin().restore(n);
|
||||
const QString className = KXmlGuiWindow::classNameOfToplevel(n);
|
||||
if (className == QLatin1String("DolphinMainWindow")) {
|
||||
DolphinMainWindow* win = app.createMainWindow();
|
||||
win->restore(n);
|
||||
} else {
|
||||
kWarning() << "Unknown class " << className << " in session saved data!";
|
||||
}
|
||||
++n;
|
||||
}
|
||||
} else {
|
||||
#endif
|
||||
return app.exec();
|
||||
app.exec();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue