MCPcopy Create free account
hub / github.com/KDE/kdevelop / loadSettings

Method loadSettings

kdevplatform/shell/mainwindow.cpp:255–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253}
254
255void MainWindow::loadSettings()
256{
257 Q_D(const MainWindow);
258
259 if (!d->isGuiSetUp()) {
260 // UiController() invokes this->loadSettings() before UiController::initialize() invokes this->initialize().
261 // this->initialize() invokes KXmlGuiWindow::setupGUI(), which resizes the window to its default size.
262 // Sublime::MainWindow::loadSettings() calls KXmlGuiWindow::applyMainWindowSettings(), which applies the size
263 // stored in the main window config *once*. If the size stored in config is applied before the default resizing,
264 // the window always ends up having the default size. Prevent this by returning early if the GUI is not set up
265 // (not initialized) yet. The settings are still always loaded when UiController::loadAllAreas() is invoked
266 // after this->initialize().
267 return;
268 }
269
270 qCDebug(SHELL) << "Loading Settings";
271
272 Sublime::MainWindow::loadSettings();
273 // Sublime::MainWindow::loadSettings() invokes QMainWindow::restoreState(), which restores corner
274 // settings. Override the corner settings to make sure they match KDevelop's custom corner options.
275 loadCornerSettings();
276}
277
278void MainWindow::configureShortcuts()
279{

Callers 4

initializeMethod · 0.45
enableBuddiesMethod · 0.45
resetMethod · 0.45

Calls 1

isGuiSetUpMethod · 0.80

Tested by 2

enableBuddiesMethod · 0.36