forked from qt-creator/qt-creator
ICore: Make sure main window is initialized
Initialize main window even if no ICore instance is created, so in that case methods like raiseWindow and dialogParent will still work. Change-Id: I7b435dedac574bcc120e996c198c413fd5ccfe6f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -297,8 +297,8 @@ using namespace ExtensionSystem;
|
||||
namespace Core {
|
||||
|
||||
// The Core Singleton
|
||||
static ICore *m_instance = 0;
|
||||
static MainWindow *m_mainwindow;
|
||||
static ICore *m_instance = nullptr;
|
||||
static MainWindow *m_mainwindow = nullptr;
|
||||
|
||||
ICore *ICore::instance()
|
||||
{
|
||||
@@ -517,7 +517,7 @@ void ICore::raiseWindow(QWidget *widget)
|
||||
if (!widget)
|
||||
return;
|
||||
QWidget *window = widget->window();
|
||||
if (window == m_mainwindow) {
|
||||
if (window && window == m_mainwindow) {
|
||||
m_mainwindow->raiseWindow();
|
||||
} else {
|
||||
window->raise();
|
||||
|
Reference in New Issue
Block a user