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 {
|
namespace Core {
|
||||||
|
|
||||||
// The Core Singleton
|
// The Core Singleton
|
||||||
static ICore *m_instance = 0;
|
static ICore *m_instance = nullptr;
|
||||||
static MainWindow *m_mainwindow;
|
static MainWindow *m_mainwindow = nullptr;
|
||||||
|
|
||||||
ICore *ICore::instance()
|
ICore *ICore::instance()
|
||||||
{
|
{
|
||||||
@@ -517,7 +517,7 @@ void ICore::raiseWindow(QWidget *widget)
|
|||||||
if (!widget)
|
if (!widget)
|
||||||
return;
|
return;
|
||||||
QWidget *window = widget->window();
|
QWidget *window = widget->window();
|
||||||
if (window == m_mainwindow) {
|
if (window && window == m_mainwindow) {
|
||||||
m_mainwindow->raiseWindow();
|
m_mainwindow->raiseWindow();
|
||||||
} else {
|
} else {
|
||||||
window->raise();
|
window->raise();
|
||||||
|
Reference in New Issue
Block a user