r22076 by jghali - #14874: Scribus crashes in Plasma 5 when using Plasma's global menu under Qt 5.9
scribus-commit
scribus-commit at lists.scribus.net
Fri Jun 23 10:54:48 UTC 2017
Author: jghali
Date: Fri Jun 23 10:54:48 2017
New Revision: 22076
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22076
Log:
#14874: Scribus crashes in Plasma 5 when using Plasma's global menu under Qt 5.9
Modified:
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribus.h
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22076&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Fri Jun 23 10:54:48 2017
@@ -367,13 +367,13 @@
m_marksCount = 0;
initDefaultValues();
-
initStatusBar();
qApp->processEvents();
-
actionManager->init(this);
+
+ initMdiArea();
initMenuBar();
createMenuBar();
initToolBars();
@@ -387,18 +387,6 @@
initKeyboardShortcuts();
resize(610, 600);
- mdiArea = new QMdiArea(this);
- mdiArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
- mdiArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
- if (m_prefsManager->appPrefs.uiPrefs.useTabs)
- {
- mdiArea->setViewMode(QMdiArea::TabbedView);
- mdiArea->setTabsClosable(true);
- mdiArea->setDocumentMode(true);
- }
- else
- mdiArea->setViewMode(QMdiArea::SubWindowView);
- setCentralWidget( mdiArea );
connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(newActWin(QMdiSubWindow *)));
//Connect windows cascade and tile actions to the workspace after its created. Only depends on mdiArea created.
connect( scrActions["windowsCascade"], SIGNAL(triggered()) , mdiArea, SLOT(cascadeSubWindows()) );
@@ -785,6 +773,21 @@
return retval;
}
+void ScribusMainWindow::initMdiArea()
+{
+ mdiArea = new QMdiArea(this);
+ mdiArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
+ mdiArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
+ if (m_prefsManager->appPrefs.uiPrefs.useTabs)
+ {
+ mdiArea->setViewMode(QMdiArea::TabbedView);
+ mdiArea->setTabsClosable(true);
+ mdiArea->setDocumentMode(true);
+ }
+ else
+ mdiArea->setViewMode(QMdiArea::SubWindowView);
+ setCentralWidget(mdiArea);
+}
void ScribusMainWindow::initMenuBar()
{
Modified: trunk/Scribus/scribus/scribus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22076&path=/trunk/Scribus/scribus/scribus.h
==============================================================================
--- trunk/Scribus/scribus/scribus.h (original)
+++ trunk/Scribus/scribus/scribus.h Fri Jun 23 10:54:48 2017
@@ -594,6 +594,7 @@
private:
/** init methods */
void initSplash(bool showSplash);
+ void initMdiArea();
void initMenuBar(); // initMenuBar creates the menu_bar and inserts the menuitems
void createMenuBar();
void addDefaultWindowMenuItems(); // addDefaultWindowMenuItems adds the basic Windows menu items, excluding the actual list of windows
More information about the scribus-commit
mailing list