Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 3524588a authored by Jekyll Wu's avatar Jekyll Wu

Prepare for adding functionality code

parent 6acfdc6e
......@@ -85,6 +85,7 @@ MainWindow::MainWindow()
// create actions for menus
setupActions();
// create view manager
_viewManager = new ViewManager(this, actionCollection());
connect(_viewManager , SIGNAL(empty()) , this , SLOT(close()));
......@@ -131,6 +132,10 @@ MainWindow::MainWindow()
// enable save and restore of window size
setAutoSaveSettings("MainWindow", true);
// this must come at the end
applyAppSettings();
connect(AppSettings::self(), SIGNAL(configChanged()), this, SLOT(applyAppSettings()));
}
void MainWindow::removeMenuAccelerators()
{
......@@ -523,6 +528,11 @@ void MainWindow::showSettingsDialog()
settingsDialog->show();
}
void MainWindow::applyAppSettings()
{
// setAutoSaveSettings("MainWindow", AppSettings::saveGeometryOnExit());
}
void MainWindow::activateMenuBar()
{
const QList<QAction*> menuActions = menuBar()->actions();
......
......@@ -183,6 +183,8 @@ private slots:
void openUrls(const QList<KUrl>& urls);
void applyAppSettings();
private:
void correctShortcuts();
void removeMenuAccelerators();
......
......@@ -66,7 +66,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Save window size on exit</string>
<string>Save window size and position on exit</string>
</property>
</widget>
</item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment