// provide specialized config widgets for those (which may be a good idea anyway, e.g. if we
// think about client-side translations...)
- QGroupBox *fieldBox = new QGroupBox;
+ auto *fieldBox = new QGroupBox;
fieldBox->setTitle(title);
+ auto *formLayout = new QFormLayout;
+ fieldBox->setLayout(formLayout);
- QFormLayout *formLayout = new QFormLayout(fieldBox);
for (auto &&fieldInfo : fieldInfos) {
QWidget *widget {nullptr};
switch (std::get<2>(fieldInfo).type()) {
setSizePolicy({QSizePolicy::Fixed, QSizePolicy::Fixed});
QSizePolicy sp{QSizePolicy::MinimumExpanding, QSizePolicy::Fixed};
-#if QT_VERSION >= 0x050200
sp.setRetainSizeWhenHidden(true);
-#else
- ui.authSettingsStack->setVisible(true); // ugly hack that will show an empty box, but we'll deprecate Qt4 soon anyway
-#endif
ui.descriptionStack->setSizePolicy(sp);
ui.authSettingsStack->setSizePolicy(sp);
QString AuthenticationSelectionPage::authenticator() const
{
-#if QT_VERSION >= 0x050200
return ui.backendList->currentData().toString();
-#else
- return ui.backendList->itemData(ui.backendList->currentIndex()).toString();
-#endif
}
setSizePolicy({QSizePolicy::Fixed, QSizePolicy::Fixed});
QSizePolicy sp{QSizePolicy::MinimumExpanding, QSizePolicy::Fixed};
-#if QT_VERSION >= 0x050200
sp.setRetainSizeWhenHidden(true);
-#else
- ui.storageSettingsStack->setVisible(true); // ugly hack that will show an empty box, but we'll deprecate Qt4 soon anyway
-#endif
ui.descriptionStack->setSizePolicy(sp);
ui.storageSettingsStack->setSizePolicy(sp);
QString StorageSelectionPage::backend() const
{
-#if QT_VERSION >= 0x050200
return ui.backendList->currentData().toString();
-#else
- return ui.backendList->itemData(ui.backendList->currentIndex()).toString();
-#endif
}
emit startOver();
return 0;
}
-}; /* namespace CoreConfigWizardPages */
+} /* namespace CoreConfigWizardPages */