forked from qt-creator/qt-creator
Cmake Open Project: Allow opening projects that have cmake errors
Change-Id: I3779fbe3f6409139b3d027f96ad390a174c0ff7f Task-number: QTCREATORBUG-6903 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
@@ -60,6 +60,7 @@
|
|||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include <QCheckBox>
|
||||||
|
|
||||||
using namespace CMakeProjectManager;
|
using namespace CMakeProjectManager;
|
||||||
using namespace CMakeProjectManager::Internal;
|
using namespace CMakeProjectManager::Internal;
|
||||||
@@ -470,6 +471,14 @@ void CMakeRunPage::initWidgets()
|
|||||||
m_exitCodeLabel->setVisible(false);
|
m_exitCodeLabel->setVisible(false);
|
||||||
fl->addRow(m_exitCodeLabel);
|
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"));
|
setTitle(tr("Run CMake"));
|
||||||
setMinimumSize(600, 400);
|
setMinimumSize(600, 400);
|
||||||
}
|
}
|
||||||
@@ -705,8 +714,10 @@ void CMakeRunPage::cmakeFinished()
|
|||||||
m_exitCodeLabel->setText(tr("CMake exited with errors. Please check CMake output."));
|
m_exitCodeLabel->setText(tr("CMake exited with errors. Please check CMake output."));
|
||||||
static_cast<Utils::HistoryCompleter *>(m_argumentsLineEdit->completer())->removeHistoryItem(0);
|
static_cast<Utils::HistoryCompleter *>(m_argumentsLineEdit->completer())->removeHistoryItem(0);
|
||||||
m_haveCbpFile = false;
|
m_haveCbpFile = false;
|
||||||
|
m_continueCheckBox->setVisible(true);
|
||||||
} else {
|
} else {
|
||||||
m_exitCodeLabel->setVisible(false);
|
m_exitCodeLabel->setVisible(false);
|
||||||
|
m_continueCheckBox->setVisible(false);
|
||||||
m_haveCbpFile = true;
|
m_haveCbpFile = true;
|
||||||
}
|
}
|
||||||
m_cmakeProcess->deleteLater();
|
m_cmakeProcess->deleteLater();
|
||||||
@@ -726,5 +737,5 @@ void CMakeRunPage::cleanupPage()
|
|||||||
bool CMakeRunPage::isComplete() const
|
bool CMakeRunPage::isComplete() const
|
||||||
{
|
{
|
||||||
int index = m_generatorComboBox->currentIndex();
|
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 <QLabel>
|
||||||
#include <QPlainTextEdit>
|
#include <QPlainTextEdit>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
class QCheckBox;
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace Utils {
|
namespace Utils {
|
||||||
class FancyLineEdit;
|
class FancyLineEdit;
|
||||||
class PathChooser;
|
class PathChooser;
|
||||||
@@ -183,6 +187,7 @@ private:
|
|||||||
QLabel *m_generatorExtraText;
|
QLabel *m_generatorExtraText;
|
||||||
QLabel *m_descriptionLabel;
|
QLabel *m_descriptionLabel;
|
||||||
QLabel *m_exitCodeLabel;
|
QLabel *m_exitCodeLabel;
|
||||||
|
QCheckBox *m_continueCheckBox;
|
||||||
bool m_haveCbpFile;
|
bool m_haveCbpFile;
|
||||||
Mode m_mode;
|
Mode m_mode;
|
||||||
QString m_buildDirectory;
|
QString m_buildDirectory;
|
||||||
|
|||||||
Reference in New Issue
Block a user