forked from qt-creator/qt-creator
Merge commit 'origin/1.1'
Conflicts: src/plugins/debugger/debuggeractions.cpp src/plugins/debugger/gdboptionpage.ui
This commit is contained in:
@@ -75,6 +75,8 @@ CMakeOpenProjectWizard::CMakeOpenProjectWizard(CMakeManager *cmakeManager, const
|
||||
setPage(CMakeRunPageId, new CMakeRunPage(this));
|
||||
|
||||
setStartId(startid);
|
||||
setOption(QWizard::NoCancelButton);
|
||||
setOption(QWizard::NoBackButtonOnStartPage);
|
||||
}
|
||||
|
||||
CMakeOpenProjectWizard::CMakeOpenProjectWizard(CMakeManager *cmakeManager, const QString &sourceDirectory,
|
||||
@@ -87,6 +89,8 @@ CMakeOpenProjectWizard::CMakeOpenProjectWizard(CMakeManager *cmakeManager, const
|
||||
addPage(new CMakeRunPage(this, buildDirectory, false));
|
||||
foreach(const QString &buildDirectory, needToUpdate)
|
||||
addPage(new CMakeRunPage(this, buildDirectory, true));
|
||||
setOption(QWizard::NoCancelButton);
|
||||
setOption(QWizard::NoBackButtonOnStartPage);
|
||||
}
|
||||
|
||||
CMakeManager *CMakeOpenProjectWizard::cmakeManager() const
|
||||
@@ -255,6 +259,9 @@ void CMakeRunPage::initWidgets()
|
||||
|
||||
m_output = new QPlainTextEdit(this);
|
||||
m_output->setReadOnly(true);
|
||||
QSizePolicy pl = m_output->sizePolicy();
|
||||
pl.setVerticalStretch(1);
|
||||
m_output->setSizePolicy(pl);
|
||||
fl->addRow(m_output);
|
||||
}
|
||||
|
||||
|
||||
@@ -512,7 +512,6 @@ void CMakeProject::restoreSettingsImpl(ProjectExplorer::PersistentSettingsReader
|
||||
cleanMakeStep->setValue("clean", true);
|
||||
} else {
|
||||
// We have a user file, but we could still be missing the cbp file
|
||||
// TODO check that we have a cbp file and if not, open up a dialog ?
|
||||
// or simply run createXml with the saved settings
|
||||
QFileInfo sourceFileInfo(m_fileName);
|
||||
QStringList needToCreate;
|
||||
|
||||
@@ -155,7 +155,10 @@ QString CMakeManager::qtVersionForQMake(const QString &qmakePath)
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString CMakeManager::findQtDir(const ProjectExplorer::Environment &env)
|
||||
// this is mostly a copy from qt4versionmanager
|
||||
// TODO refactor this code
|
||||
// returns QPair< QTDIR, QT_INSTALL_DATA >
|
||||
QPair<QString, QString> CMakeManager::findQtDir(const ProjectExplorer::Environment &env)
|
||||
{
|
||||
QStringList possibleCommands;
|
||||
// On windows noone has renamed qmake, right?
|
||||
@@ -171,21 +174,23 @@ QString CMakeManager::findQtDir(const ProjectExplorer::Environment &env)
|
||||
QFileInfo qmake(path + "/" + possibleCommand);
|
||||
if (qmake.exists()) {
|
||||
if (!qtVersionForQMake(qmake.absoluteFilePath()).isNull()) {
|
||||
QDir qtDir = qmake.absoluteDir();
|
||||
qtDir.cdUp();
|
||||
QProcess proc;
|
||||
proc.start(qmake.absoluteFilePath(), QStringList() << "-query" << "QT_INSTALL_DATA");
|
||||
if (proc.waitForFinished()) {
|
||||
return proc.readAll().trimmed();
|
||||
return qMakePair(qtDir.absolutePath(), QString(proc.readAll().trimmed()));
|
||||
} else {
|
||||
proc.kill();
|
||||
QDir dir(qmake.absoluteDir());
|
||||
dir.cdUp();
|
||||
return dir.absolutePath();
|
||||
return qMakePair(qtDir.absolutePath(), dir.absolutePath());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return QString();
|
||||
return qMakePair(QString(), QString());
|
||||
}
|
||||
|
||||
// This code is more or less duplicated in qtversionmanager
|
||||
@@ -195,14 +200,16 @@ QString CMakeManager::findDumperLibrary(const ProjectExplorer::Environment &env)
|
||||
static QString lastpath;
|
||||
if (lastenv == env)
|
||||
return lastpath;
|
||||
QString qtdir = findQtDir(env);
|
||||
if (qtdir.isEmpty())
|
||||
|
||||
QPair<QString, QString> pair = findQtDir(env);
|
||||
QString qtInstallDataDir = pair.second;
|
||||
if (qtInstallDataDir.isEmpty())
|
||||
return QString();
|
||||
|
||||
uint hash = qHash(qtdir);
|
||||
uint hash = qHash(pair.first);
|
||||
QStringList directories;
|
||||
directories
|
||||
<< (qtdir + "/qtc-debugging-helper/")
|
||||
<< (qtInstallDataDir + "/qtc-debugging-helper/")
|
||||
<< (QApplication::applicationDirPath() + "/../qtc-debugging-helper/" + QString::number(hash)) + "/"
|
||||
<< (QDesktopServices::storageLocation(QDesktopServices::DataLocation) + "/qtc-debugging-helper/" + QString::number(hash)) + "/";
|
||||
foreach(const QString &directory, directories) {
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
static QString findDumperLibrary(const ProjectExplorer::Environment &env);
|
||||
private:
|
||||
static QString qtVersionForQMake(const QString &qmakePath);
|
||||
static QString findQtDir(const ProjectExplorer::Environment &env);
|
||||
static QPair<QString, QString> findQtDir(const ProjectExplorer::Environment &env);
|
||||
int m_projectContext;
|
||||
int m_projectLanguage;
|
||||
CMakeSettingsPage *m_settingsPage;
|
||||
|
||||
Reference in New Issue
Block a user