forked from qt-creator/qt-creator
Fixed two dialogs to use the main window as parent
Setting a parent makes sure the dialog is correctly centered and shares the taskbar entry.
This commit is contained in:
@@ -204,7 +204,7 @@ void CodepasterPlugin::fetch()
|
|||||||
}
|
}
|
||||||
m_fetcher = new CustomFetcher(serverUrl());
|
m_fetcher = new CustomFetcher(serverUrl());
|
||||||
|
|
||||||
QDialog dialog;
|
QDialog dialog(ICore::instance()->mainWindow());
|
||||||
Ui_PasteSelectDialog ui;
|
Ui_PasteSelectDialog ui;
|
||||||
ui.setupUi(&dialog);
|
ui.setupUi(&dialog);
|
||||||
|
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ QString ApplicationRunConfigurationRunner::displayName() const
|
|||||||
return tr("Run");
|
return tr("Run");
|
||||||
}
|
}
|
||||||
|
|
||||||
RunControl* ApplicationRunConfigurationRunner::run(QSharedPointer<RunConfiguration> runConfiguration, const QString &mode)
|
RunControl *ApplicationRunConfigurationRunner::run(QSharedPointer<RunConfiguration> runConfiguration, const QString &mode)
|
||||||
{
|
{
|
||||||
QSharedPointer<ApplicationRunConfiguration> rc = qSharedPointerCast<ApplicationRunConfiguration>(runConfiguration);
|
QSharedPointer<ApplicationRunConfiguration> rc = qSharedPointerCast<ApplicationRunConfiguration>(runConfiguration);
|
||||||
Q_ASSERT(rc);
|
Q_ASSERT(rc);
|
||||||
|
|||||||
@@ -31,12 +31,14 @@
|
|||||||
#include "environment.h"
|
#include "environment.h"
|
||||||
#include "project.h"
|
#include "project.h"
|
||||||
|
|
||||||
|
#include <coreplugin/icore.h>
|
||||||
#include <projectexplorer/debugginghelper.h>
|
#include <projectexplorer/debugginghelper.h>
|
||||||
|
|
||||||
#include <QtGui/QCheckBox>
|
#include <QtGui/QCheckBox>
|
||||||
#include <QtGui/QFormLayout>
|
#include <QtGui/QFormLayout>
|
||||||
#include <QtGui/QLineEdit>
|
#include <QtGui/QLineEdit>
|
||||||
#include <QtGui/QLabel>
|
#include <QtGui/QLabel>
|
||||||
|
#include <QtGui/QMainWindow>
|
||||||
#include <QtGui/QHBoxLayout>
|
#include <QtGui/QHBoxLayout>
|
||||||
#include <QtGui/QToolButton>
|
#include <QtGui/QToolButton>
|
||||||
#include <QtGui/QFileDialog>
|
#include <QtGui/QFileDialog>
|
||||||
@@ -190,7 +192,7 @@ QString CustomExecutableRunConfiguration::executable() const
|
|||||||
if (!QFileInfo(exec).exists()) {
|
if (!QFileInfo(exec).exists()) {
|
||||||
// Oh the executable doesn't exists, ask the user.
|
// Oh the executable doesn't exists, ask the user.
|
||||||
QWidget *confWidget = const_cast<CustomExecutableRunConfiguration *>(this)->configurationWidget();
|
QWidget *confWidget = const_cast<CustomExecutableRunConfiguration *>(this)->configurationWidget();
|
||||||
QDialog dialog;
|
QDialog dialog(Core::ICore::instance()->mainWindow());
|
||||||
dialog.setLayout(new QVBoxLayout());
|
dialog.setLayout(new QVBoxLayout());
|
||||||
dialog.layout()->addWidget(new QLabel(tr("Could not find the executable, please specify one.")));
|
dialog.layout()->addWidget(new QLabel(tr("Could not find the executable, please specify one.")));
|
||||||
dialog.layout()->addWidget(confWidget);
|
dialog.layout()->addWidget(confWidget);
|
||||||
|
|||||||
Reference in New Issue
Block a user