Commit f7571e8b authored by David Narváez's avatar David Narváez

Prevent the Extra Arguments ComboBox to Stretch Too Much

Summary: This basically ports d56117d6 to the build dir chooser.

Test Plan: Create a new project from template (pick any template, any valid name) and add some ridiculously long cmake extra arguments (say, -DTEST=<really long string>), then create a new project again and look at the size of the Extra Arguments combo box.

Reviewers: #kdevelop, mwolff

Reviewed By: #kdevelop, mwolff

Subscribers: mwolff, kdevelop-devel

Tags: #kdevelop

Differential Revision: https://phabricator.kde.org/D18414
parent 62f68fdd
......@@ -61,6 +61,10 @@ CMakeBuildDirChooser::CMakeBuildDirChooser(QWidget* parent)
m_chooserUi->buildFolder->setMode(KFile::Directory|KFile::ExistingOnly);
m_chooserUi->installPrefix->setMode(KFile::Directory|KFile::ExistingOnly);
// configure the extraArguments widget to span the widget width but not
// expand the dialog to the width of the longest element in the argument history.
// static_cast<QComboBox*> needed because KComboBox::minimumSizeHint() override by mistake made it protected
m_chooserUi->extraArguments->setMinimumWidth(static_cast<QComboBox*>(m_chooserUi->extraArguments)->minimumSizeHint().width());
m_extraArgumentsHistory = new CMakeExtraArgumentsHistory(m_chooserUi->extraArguments);
connect(m_chooserUi->buildFolder, &KUrlRequester::textChanged, this, &CMakeBuildDirChooser::updated);
......
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