mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-29 18:51:05 -05:00
CMake GUI: Improve signal specification
Don't use subclasses to connect to QAbstractButton::clicked. This is slightly dodgy, but of more immediate importance, tweaking it will allow us to change the widget type of some QToolButton instances that should be QPushButton.
This commit is contained in:
@@ -253,7 +253,7 @@ void CMakeSetupDialog::initialize()
|
|||||||
&QCMake::propertiesChanged, this->CacheValues->cacheModel(),
|
&QCMake::propertiesChanged, this->CacheValues->cacheModel(),
|
||||||
&QCMakeCacheModel::setProperties);
|
&QCMakeCacheModel::setProperties);
|
||||||
|
|
||||||
QObject::connect(this->ConfigureButton, &QPushButton::clicked, this,
|
QObject::connect(this->ConfigureButton, &QAbstractButton::clicked, this,
|
||||||
&CMakeSetupDialog::doConfigure);
|
&CMakeSetupDialog::doConfigure);
|
||||||
|
|
||||||
QObject::connect(this->CMakeThread->cmakeInstance(), &QCMake::configureDone,
|
QObject::connect(this->CMakeThread->cmakeInstance(), &QCMake::configureDone,
|
||||||
@@ -261,15 +261,17 @@ void CMakeSetupDialog::initialize()
|
|||||||
QObject::connect(this->CMakeThread->cmakeInstance(), &QCMake::generateDone,
|
QObject::connect(this->CMakeThread->cmakeInstance(), &QCMake::generateDone,
|
||||||
this, &CMakeSetupDialog::exitLoop);
|
this, &CMakeSetupDialog::exitLoop);
|
||||||
|
|
||||||
QObject::connect(this->GenerateButton, &QPushButton::clicked, this,
|
QObject::connect(this->GenerateButton, &QAbstractButton::clicked, this,
|
||||||
&CMakeSetupDialog::doGenerate);
|
&CMakeSetupDialog::doGenerate);
|
||||||
QObject::connect(this->OpenProjectButton, &QPushButton::clicked, this,
|
QObject::connect(this->OpenProjectButton, &QAbstractButton::clicked, this,
|
||||||
&CMakeSetupDialog::doOpenProject);
|
&CMakeSetupDialog::doOpenProject);
|
||||||
|
|
||||||
QObject::connect(this->BrowseSourceDirectoryButton, &QPushButton::clicked,
|
QObject::connect(this->BrowseSourceDirectoryButton,
|
||||||
this, &CMakeSetupDialog::doSourceBrowse);
|
&QAbstractButton::clicked, this,
|
||||||
QObject::connect(this->BrowseBinaryDirectoryButton, &QPushButton::clicked,
|
&CMakeSetupDialog::doSourceBrowse);
|
||||||
this, &CMakeSetupDialog::doBinaryBrowse);
|
QObject::connect(this->BrowseBinaryDirectoryButton,
|
||||||
|
&QAbstractButton::clicked, this,
|
||||||
|
&CMakeSetupDialog::doBinaryBrowse);
|
||||||
|
|
||||||
QObject::connect(this->BinaryDirectory, &QComboBox::editTextChanged, this,
|
QObject::connect(this->BinaryDirectory, &QComboBox::editTextChanged, this,
|
||||||
&CMakeSetupDialog::onBinaryDirectoryChanged);
|
&CMakeSetupDialog::onBinaryDirectoryChanged);
|
||||||
@@ -324,12 +326,12 @@ void CMakeSetupDialog::initialize()
|
|||||||
QObject::connect(this->CacheValues->selectionModel(),
|
QObject::connect(this->CacheValues->selectionModel(),
|
||||||
&QItemSelectionModel::selectionChanged, this,
|
&QItemSelectionModel::selectionChanged, this,
|
||||||
&CMakeSetupDialog::selectionChanged);
|
&CMakeSetupDialog::selectionChanged);
|
||||||
QObject::connect(this->RemoveEntry, &QToolButton::clicked, this,
|
QObject::connect(this->RemoveEntry, &QAbstractButton::clicked, this,
|
||||||
&CMakeSetupDialog::removeSelectedCacheEntries);
|
&CMakeSetupDialog::removeSelectedCacheEntries);
|
||||||
QObject::connect(this->AddEntry, &QToolButton::clicked, this,
|
QObject::connect(this->AddEntry, &QAbstractButton::clicked, this,
|
||||||
&CMakeSetupDialog::addCacheEntry);
|
&CMakeSetupDialog::addCacheEntry);
|
||||||
|
|
||||||
QObject::connect(this->Environment, &QToolButton::clicked, this,
|
QObject::connect(this->Environment, &QAbstractButton::clicked, this,
|
||||||
&CMakeSetupDialog::editEnvironment);
|
&CMakeSetupDialog::editEnvironment);
|
||||||
|
|
||||||
QObject::connect(this->WarnUninitializedAction, &QAction::triggered,
|
QObject::connect(this->WarnUninitializedAction, &QAction::triggered,
|
||||||
|
|||||||
@@ -106,9 +106,9 @@ EnvironmentDialog::EnvironmentDialog(const QProcessEnvironment& environment,
|
|||||||
this->Environment->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
this->Environment->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||||
this->Environment->setSelectionBehavior(QAbstractItemView::SelectRows);
|
this->Environment->setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||||
|
|
||||||
QObject::connect(this->AddEntry, &QToolButton::clicked, this,
|
QObject::connect(this->AddEntry, &QAbstractButton::clicked, this,
|
||||||
&EnvironmentDialog::addEntry);
|
&EnvironmentDialog::addEntry);
|
||||||
QObject::connect(this->RemoveEntry, &QToolButton::clicked, this,
|
QObject::connect(this->RemoveEntry, &QAbstractButton::clicked, this,
|
||||||
&EnvironmentDialog::removeSelectedEntries);
|
&EnvironmentDialog::removeSelectedEntries);
|
||||||
QObject::connect(this->Search, &QLineEdit::textChanged, this->m_filter,
|
QObject::connect(this->Search, &QLineEdit::textChanged, this->m_filter,
|
||||||
&EnvironmentSearchFilter::setFilterFixedString);
|
&EnvironmentSearchFilter::setFilterFixedString);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ QCMakeFileEditor::QCMakeFileEditor(QWidget* p, QString var)
|
|||||||
this->ToolButton = new QToolButton(this);
|
this->ToolButton = new QToolButton(this);
|
||||||
this->ToolButton->setText("...");
|
this->ToolButton->setText("...");
|
||||||
this->ToolButton->setCursor(QCursor(Qt::ArrowCursor));
|
this->ToolButton->setCursor(QCursor(Qt::ArrowCursor));
|
||||||
QObject::connect(this->ToolButton, &QToolButton::clicked, this,
|
QObject::connect(this->ToolButton, &QAbstractButton::clicked, this,
|
||||||
&QCMakeFileEditor::chooseFile);
|
&QCMakeFileEditor::chooseFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user