Changeset View
Changeset View
Standalone View
Standalone View
src/main.cpp
Show All 16 Lines | 1 | /* | |||
---|---|---|---|---|---|
17 | 02110-1301 USA. | 17 | 02110-1301 USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | // Own | 20 | // Own | ||
21 | #include "Application.h" | 21 | #include "Application.h" | ||
22 | #include "MainWindow.h" | 22 | #include "MainWindow.h" | ||
23 | #include "config-konsole.h" //krazy:exclude=includes | 23 | #include "config-konsole.h" //krazy:exclude=includes | ||
24 | #include "KonsoleSettings.h" | 24 | #include "KonsoleSettings.h" | ||
25 | #include "ViewManager.h" | ||||
25 | 26 | | |||
26 | // OS specific | 27 | // OS specific | ||
27 | #include <qplatformdefs.h> | 28 | #include <qplatformdefs.h> | ||
28 | #include <QApplication> | 29 | #include <QApplication> | ||
29 | #include <QCommandLineParser> | 30 | #include <QCommandLineParser> | ||
30 | #include <QStandardPaths> | 31 | #include <QStandardPaths> | ||
31 | #include <QDir> | 32 | #include <QDir> | ||
32 | 33 | | |||
▲ Show 20 Lines • Show All 331 Lines • ▼ Show 20 Line(s) | 364 | aboutData.addCredit(i18nc("@info:credit", "Lars Knoll"), | |||
364 | i18nc("@info:credit", "Bug fixes"), | 365 | i18nc("@info:credit", "Bug fixes"), | ||
365 | QStringLiteral("knoll@mpi-hd.mpg.de")); | 366 | QStringLiteral("knoll@mpi-hd.mpg.de")); | ||
366 | aboutData.addCredit(i18nc("@info:credit", "Thanks to many others.\n")); | 367 | aboutData.addCredit(i18nc("@info:credit", "Thanks to many others.\n")); | ||
367 | } | 368 | } | ||
368 | 369 | | |||
369 | void restoreSession(Application &app) | 370 | void restoreSession(Application &app) | ||
370 | { | 371 | { | ||
371 | int n = 1; | 372 | int n = 1; | ||
373 | | ||||
372 | while (KMainWindow::canBeRestored(n)) { | 374 | while (KMainWindow::canBeRestored(n)) { | ||
373 | app.newMainWindow()->restore(n++); | 375 | auto mainWindow = app.newMainWindow(); | ||
376 | mainWindow->restore(n++); | ||||
377 | mainWindow->viewManager()->toggleActionsBasedOnState(); | ||||
374 | } | 378 | } | ||
375 | } | 379 | } |