forked from qt-creator/qt-creator
CppEditor: Use scroll area in dialog for InsertDefsOperation
Fixes: QTCREATORBUG-32193 Change-Id: I8c3930c3c85e7bf6f2c7005f4489ff758c710e09 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
|
#include <QScrollArea>
|
||||||
|
|
||||||
#ifdef WITH_TESTS
|
#ifdef WITH_TESTS
|
||||||
#include "cppquickfix_test.h"
|
#include "cppquickfix_test.h"
|
||||||
@@ -256,7 +257,8 @@ public:
|
|||||||
defaultImplTargetLayout->addWidget(new QLabel(Tr::tr("Default implementation location:")));
|
defaultImplTargetLayout->addWidget(new QLabel(Tr::tr("Default implementation location:")));
|
||||||
defaultImplTargetLayout->addWidget(defaultImplTargetComboBox);
|
defaultImplTargetLayout->addWidget(defaultImplTargetComboBox);
|
||||||
|
|
||||||
const auto candidatesLayout = new QGridLayout;
|
const auto candidatesWidget = new QWidget;
|
||||||
|
const auto candidatesLayout = new QGridLayout(candidatesWidget);
|
||||||
Overview oo = CppCodeStyleSettings::currentProjectCodeStyleOverview();
|
Overview oo = CppCodeStyleSettings::currentProjectCodeStyleOverview();
|
||||||
oo.showFunctionSignatures = true;
|
oo.showFunctionSignatures = true;
|
||||||
oo.showReturnTypes = true;
|
oo.showReturnTypes = true;
|
||||||
@@ -272,6 +274,8 @@ public:
|
|||||||
i, 0);
|
i, 0);
|
||||||
candidatesLayout->addWidget(implTargetComboBox, i, 1);
|
candidatesLayout->addWidget(implTargetComboBox, i, 1);
|
||||||
}
|
}
|
||||||
|
const auto scrollArea = new QScrollArea;
|
||||||
|
scrollArea->setWidget(candidatesWidget);
|
||||||
|
|
||||||
const auto buttonBox
|
const auto buttonBox
|
||||||
= new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
= new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
||||||
@@ -282,7 +286,7 @@ public:
|
|||||||
const auto mainLayout = new QVBoxLayout(this);
|
const auto mainLayout = new QVBoxLayout(this);
|
||||||
mainLayout->addLayout(defaultImplTargetLayout);
|
mainLayout->addLayout(defaultImplTargetLayout);
|
||||||
mainLayout->addWidget(Layouting::createHr(this));
|
mainLayout->addWidget(Layouting::createHr(this));
|
||||||
mainLayout->addLayout(candidatesLayout);
|
mainLayout->addWidget(scrollArea);
|
||||||
mainLayout->addWidget(buttonBox);
|
mainLayout->addWidget(buttonBox);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user