Commit c9a9f08d authored by Daniel Teske's avatar Daniel Teske

Cmake Open Project: Allow opening projects that have cmake errors

Change-Id: I3779fbe3f6409139b3d027f96ad390a174c0ff7f
Task-number: QTCREATORBUG-6903
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent 87b15b45
......@@ -60,6 +60,7 @@
#include <QSettings>
#include <QStringList>
#include <QApplication>
#include <QCheckBox>
using namespace CMakeProjectManager;
using namespace CMakeProjectManager::Internal;
......@@ -470,6 +471,14 @@ void CMakeRunPage::initWidgets()
m_exitCodeLabel->setVisible(false);
fl->addRow(m_exitCodeLabel);
m_continueCheckBox = new QCheckBox(this);
m_continueCheckBox->setVisible(false);
m_continueCheckBox->setText(tr("Open project with errors."));
fl->addRow(m_continueCheckBox);
connect(m_continueCheckBox, &QCheckBox::toggled,
this, &CMakeRunPage::completeChanged);
setTitle(tr("Run CMake"));
setMinimumSize(600, 400);
}
......@@ -705,8 +714,10 @@ void CMakeRunPage::cmakeFinished()
m_exitCodeLabel->setText(tr("CMake exited with errors. Please check CMake output."));
static_cast<Utils::HistoryCompleter *>(m_argumentsLineEdit->completer())->removeHistoryItem(0);
m_haveCbpFile = false;
m_continueCheckBox->setVisible(true);
} else {
m_exitCodeLabel->setVisible(false);
m_continueCheckBox->setVisible(false);
m_haveCbpFile = true;
}
m_cmakeProcess->deleteLater();
......@@ -726,5 +737,5 @@ void CMakeRunPage::cleanupPage()
bool CMakeRunPage::isComplete() const
{
int index = m_generatorComboBox->currentIndex();
return index != -1 && m_haveCbpFile;
return index != -1 && (m_haveCbpFile || m_continueCheckBox->isChecked());
}
......@@ -46,6 +46,10 @@
#include <QLabel>
#include <QPlainTextEdit>
QT_BEGIN_NAMESPACE
class QCheckBox;
QT_END_NAMESPACE
namespace Utils {
class FancyLineEdit;
class PathChooser;
......@@ -183,6 +187,7 @@ private:
QLabel *m_generatorExtraText;
QLabel *m_descriptionLabel;
QLabel *m_exitCodeLabel;
QCheckBox *m_continueCheckBox;
bool m_haveCbpFile;
Mode m_mode;
QString m_buildDirectory;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment