Hardcode a special case of using qOverload for slots without arguments
Pick-to: 6.0 Fixes: QTBUG-90308 Change-Id: I35cd45679ded626654dd0e7e3eea8a7bb14c1d56 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
parent
9cd3ff2bde
commit
98a89fb711
@ -387,22 +387,33 @@ void _formatStackVariable(QTextStream &str, const char *className, QStringView v
|
||||
}
|
||||
}
|
||||
|
||||
enum OverloadUse {
|
||||
UseOverload,
|
||||
UseOverloadWhenNoArguments, // Use overload only when the argument list is empty,
|
||||
// in this case there is no chance of connecting
|
||||
// mismatching T against const T &
|
||||
DontUseOverload
|
||||
};
|
||||
|
||||
// Format a member function for a signal slot connection
|
||||
static void formatMemberFnPtr(QTextStream &str, const SignalSlot &s,
|
||||
bool useQOverload = false)
|
||||
OverloadUse useQOverload = DontUseOverload)
|
||||
{
|
||||
const int parenPos = s.signature.indexOf(QLatin1Char('('));
|
||||
Q_ASSERT(parenPos >= 0);
|
||||
if (useQOverload) {
|
||||
const auto parameters = QStringView{s.signature}.mid(parenPos + 1,
|
||||
s.signature.size() - parenPos - 2);
|
||||
str << "qOverload<" << parameters << ">(";
|
||||
}
|
||||
|
||||
const auto functionName = QStringView{s.signature}.left(parenPos);
|
||||
|
||||
const auto parameters = QStringView{s.signature}.mid(parenPos + 1,
|
||||
s.signature.size() - parenPos - 2);
|
||||
const bool withOverload = useQOverload == UseOverload ||
|
||||
(useQOverload == UseOverloadWhenNoArguments && parameters.isEmpty());
|
||||
|
||||
if (withOverload)
|
||||
str << "qOverload<" << parameters << ">(";
|
||||
|
||||
str << '&' << s.className << "::" << functionName;
|
||||
|
||||
if (useQOverload)
|
||||
if (withOverload)
|
||||
str << ')';
|
||||
}
|
||||
|
||||
@ -413,7 +424,7 @@ static void formatMemberFnPtrConnection(QTextStream &str,
|
||||
str << "QObject::connect(" << sender.name << ", ";
|
||||
formatMemberFnPtr(str, sender);
|
||||
str << ", " << receiver.name << ", ";
|
||||
formatMemberFnPtr(str, receiver);
|
||||
formatMemberFnPtr(str, receiver, UseOverloadWhenNoArguments);
|
||||
str << ')';
|
||||
}
|
||||
|
||||
|
@ -34,8 +34,8 @@ public:
|
||||
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
|
||||
|
||||
retranslateUi(Dialog);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(Dialog);
|
||||
} // setupUi
|
||||
|
@ -34,8 +34,8 @@ public:
|
||||
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
|
||||
|
||||
retranslateUi(Dialog);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(Dialog);
|
||||
} // setupUi
|
||||
|
@ -90,8 +90,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(AddLinkDialog);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, AddLinkDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, AddLinkDialog, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, AddLinkDialog, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, AddLinkDialog, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(AddLinkDialog);
|
||||
} // setupUi
|
||||
|
@ -198,8 +198,8 @@ public:
|
||||
QWidget::setTabOrder(okButton, cancelButton);
|
||||
|
||||
retranslateUi(AddTorrentFile);
|
||||
QObject::connect(okButton, &QPushButton::clicked, AddTorrentFile, &QDialog::accept);
|
||||
QObject::connect(cancelButton, &QPushButton::clicked, AddTorrentFile, &QDialog::reject);
|
||||
QObject::connect(okButton, &QPushButton::clicked, AddTorrentFile, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(cancelButton, &QPushButton::clicked, AddTorrentFile, qOverload<>(&QDialog::reject));
|
||||
|
||||
browseTorrents->setDefault(true);
|
||||
|
||||
|
@ -95,8 +95,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(Dialog);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(Dialog);
|
||||
} // setupUi
|
||||
|
@ -141,8 +141,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(BookmarkDialog);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, BookmarkDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, BookmarkDialog, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, BookmarkDialog, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, BookmarkDialog, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(BookmarkDialog);
|
||||
} // setupUi
|
||||
|
@ -50,8 +50,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(Dialog);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(Dialog);
|
||||
} // setupUi
|
||||
|
@ -84,7 +84,7 @@ public:
|
||||
|
||||
|
||||
retranslateUi(CertificateInfo);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::clicked, CertificateInfo, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::clicked, CertificateInfo, qOverload<>(&QDialog::accept));
|
||||
|
||||
QMetaObject::connectSlotsByName(CertificateInfo);
|
||||
} // setupUi
|
||||
|
@ -139,8 +139,8 @@ public:
|
||||
menuFile->addAction(actionQuit);
|
||||
|
||||
retranslateUi(ChatMainWindow);
|
||||
QObject::connect(messageLineEdit, &QLineEdit::returnPressed, sendButton, &QPushButton::animateClick);
|
||||
QObject::connect(actionQuit, &QAction::triggered, ChatMainWindow, &QMainWindow::close);
|
||||
QObject::connect(messageLineEdit, &QLineEdit::returnPressed, sendButton, qOverload<>(&QPushButton::animateClick));
|
||||
QObject::connect(actionQuit, &QAction::triggered, ChatMainWindow, qOverload<>(&QMainWindow::close));
|
||||
|
||||
QMetaObject::connectSlotsByName(ChatMainWindow);
|
||||
} // setupUi
|
||||
|
@ -104,8 +104,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(NicknameDialog);
|
||||
QObject::connect(okButton, &QPushButton::clicked, NicknameDialog, &QDialog::accept);
|
||||
QObject::connect(cancelButton, &QPushButton::clicked, NicknameDialog, &QDialog::reject);
|
||||
QObject::connect(okButton, &QPushButton::clicked, NicknameDialog, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(cancelButton, &QPushButton::clicked, NicknameDialog, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(NicknameDialog);
|
||||
} // setupUi
|
||||
|
@ -695,8 +695,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(Config);
|
||||
QObject::connect(size_width, &QSpinBox::valueChanged, size_custom, &QRadioButton::click);
|
||||
QObject::connect(size_height, &QSpinBox::valueChanged, size_custom, &QRadioButton::click);
|
||||
QObject::connect(size_width, &QSpinBox::valueChanged, size_custom, qOverload<>(&QRadioButton::click));
|
||||
QObject::connect(size_height, &QSpinBox::valueChanged, size_custom, qOverload<>(&QRadioButton::click));
|
||||
|
||||
buttonOk->setDefault(true);
|
||||
|
||||
|
@ -119,8 +119,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(ConnectDialog);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, ConnectDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, ConnectDialog, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, ConnectDialog, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, ConnectDialog, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(ConnectDialog);
|
||||
} // setupUi
|
||||
|
@ -85,7 +85,7 @@ public:
|
||||
|
||||
|
||||
retranslateUi(CookiesDialog);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, CookiesDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, CookiesDialog, qOverload<>(&QDialog::accept));
|
||||
|
||||
QMetaObject::connectSlotsByName(CookiesDialog);
|
||||
} // setupUi
|
||||
|
@ -152,7 +152,7 @@ public:
|
||||
|
||||
|
||||
retranslateUi(CookiesExceptionsDialog);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, CookiesExceptionsDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, CookiesExceptionsDialog, qOverload<>(&QDialog::accept));
|
||||
|
||||
QMetaObject::connectSlotsByName(CookiesExceptionsDialog);
|
||||
} // setupUi
|
||||
|
@ -183,7 +183,7 @@ public:
|
||||
QWidget::setTabOrder(translations, matchCase);
|
||||
|
||||
retranslateUi(FindDialog);
|
||||
QObject::connect(cancel, &QPushButton::clicked, FindDialog, &QDialog::reject);
|
||||
QObject::connect(cancel, &QPushButton::clicked, FindDialog, qOverload<>(&QDialog::reject));
|
||||
|
||||
findNxt->setDefault(true);
|
||||
|
||||
|
@ -264,8 +264,8 @@ public:
|
||||
QWidget::setTabOrder(spacingFunctionLineEdit, pixmapFunctionLineEdit);
|
||||
|
||||
retranslateUi(FormWindowSettings);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, FormWindowSettings, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, FormWindowSettings, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, FormWindowSettings, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, FormWindowSettings, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(FormWindowSettings);
|
||||
} // setupUi
|
||||
|
@ -85,7 +85,7 @@ public:
|
||||
|
||||
|
||||
retranslateUi(HistoryDialog);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, HistoryDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, HistoryDialog, qOverload<>(&QDialog::accept));
|
||||
|
||||
QMetaObject::connectSlotsByName(HistoryDialog);
|
||||
} // setupUi
|
||||
|
@ -189,7 +189,7 @@ public:
|
||||
QWidget::setTabOrder(okButton, cancelButton);
|
||||
|
||||
retranslateUi(dialog);
|
||||
QObject::connect(nameLineEdit, &QLineEdit::returnPressed, okButton, &QPushButton::animateClick);
|
||||
QObject::connect(nameLineEdit, &QLineEdit::returnPressed, okButton, qOverload<>(&QPushButton::animateClick));
|
||||
|
||||
QMetaObject::connectSlotsByName(dialog);
|
||||
} // setupUi
|
||||
|
@ -113,7 +113,7 @@ public:
|
||||
|
||||
|
||||
retranslateUi(InstallDialog);
|
||||
QObject::connect(closeButton, &QPushButton::clicked, InstallDialog, &QDialog::accept);
|
||||
QObject::connect(closeButton, &QPushButton::clicked, InstallDialog, qOverload<>(&QDialog::accept));
|
||||
|
||||
QMetaObject::connectSlotsByName(InstallDialog);
|
||||
} // setupUi
|
||||
|
@ -101,7 +101,7 @@ public:
|
||||
|
||||
|
||||
retranslateUi(LanguagesDialog);
|
||||
QObject::connect(okButton, &QPushButton::clicked, LanguagesDialog, &QDialog::accept);
|
||||
QObject::connect(okButton, &QPushButton::clicked, LanguagesDialog, qOverload<>(&QDialog::accept));
|
||||
|
||||
QMetaObject::connectSlotsByName(LanguagesDialog);
|
||||
} // setupUi
|
||||
|
@ -165,8 +165,8 @@ public:
|
||||
QWidget::setTabOrder(moveItemUpButton, moveItemDownButton);
|
||||
|
||||
retranslateUi(qdesigner_internal__ListWidgetEditor);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__ListWidgetEditor, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__ListWidgetEditor, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__ListWidgetEditor, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__ListWidgetEditor, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(qdesigner_internal__ListWidgetEditor);
|
||||
} // setupUi
|
||||
|
@ -346,7 +346,7 @@ public:
|
||||
menuFile->addAction(action_Exit);
|
||||
|
||||
retranslateUi(MainWindow);
|
||||
QObject::connect(action_Exit, &QAction::triggered, MainWindow, &QMainWindow::close);
|
||||
QObject::connect(action_Exit, &QAction::triggered, MainWindow, qOverload<>(&QMainWindow::close));
|
||||
QObject::connect(chooseFromCodePoints, &QRadioButton::toggled, characterRangeView, &QListWidget::setEnabled);
|
||||
QObject::connect(chooseFromCodePoints, &QRadioButton::toggled, selectAll, &QPushButton::setEnabled);
|
||||
QObject::connect(chooseFromCodePoints, &QRadioButton::toggled, deselectAll, &QPushButton::setEnabled);
|
||||
|
@ -152,8 +152,8 @@ public:
|
||||
QWidget::setTabOrder(editActionText, editObjectName);
|
||||
|
||||
retranslateUi(qdesigner_internal__NewActionDialog);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__NewActionDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__NewActionDialog, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__NewActionDialog, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__NewActionDialog, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(qdesigner_internal__NewActionDialog);
|
||||
} // setupUi
|
||||
|
@ -123,8 +123,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(qdesigner_internal__OrderDialog);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__OrderDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__OrderDialog, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__OrderDialog, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__OrderDialog, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(qdesigner_internal__OrderDialog);
|
||||
} // setupUi
|
||||
|
@ -190,8 +190,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(qdesigner_internal__PaletteEditor);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__PaletteEditor, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__PaletteEditor, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__PaletteEditor, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__PaletteEditor, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(qdesigner_internal__PaletteEditor);
|
||||
} // setupUi
|
||||
|
@ -91,8 +91,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(PasswordDialog);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, PasswordDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, PasswordDialog, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, PasswordDialog, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, PasswordDialog, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(PasswordDialog);
|
||||
} // setupUi
|
||||
|
@ -105,7 +105,7 @@ public:
|
||||
|
||||
|
||||
retranslateUi(PluginDialog);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, PluginDialog, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, PluginDialog, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(PluginDialog);
|
||||
} // setupUi
|
||||
|
@ -143,8 +143,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(PreferencesDialog);
|
||||
QObject::connect(m_dialogButtonBox, &QDialogButtonBox::accepted, PreferencesDialog, &QDialog::accept);
|
||||
QObject::connect(m_dialogButtonBox, &QDialogButtonBox::rejected, PreferencesDialog, &QDialog::reject);
|
||||
QObject::connect(m_dialogButtonBox, &QDialogButtonBox::accepted, PreferencesDialog, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(m_dialogButtonBox, &QDialogButtonBox::rejected, PreferencesDialog, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(PreferencesDialog);
|
||||
} // setupUi
|
||||
|
@ -163,8 +163,8 @@ public:
|
||||
#endif // QT_CONFIG(shortcut)
|
||||
|
||||
retranslateUi(PreviewDialogBase);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, PreviewDialogBase, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, PreviewDialogBase, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, PreviewDialogBase, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, PreviewDialogBase, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(PreviewDialogBase);
|
||||
} // setupUi
|
||||
|
@ -80,8 +80,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(ProxyDialog);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, ProxyDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, ProxyDialog, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, ProxyDialog, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, ProxyDialog, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(ProxyDialog);
|
||||
} // setupUi
|
||||
|
@ -82,8 +82,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(QtGradientDialog);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, QtGradientDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, QtGradientDialog, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, QtGradientDialog, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, QtGradientDialog, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(QtGradientDialog);
|
||||
} // setupUi
|
||||
|
@ -82,8 +82,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(QtGradientViewDialog);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, QtGradientViewDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, QtGradientViewDialog, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, QtGradientViewDialog, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, QtGradientViewDialog, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(QtGradientViewDialog);
|
||||
} // setupUi
|
||||
|
@ -134,8 +134,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(QtResourceEditorDialog);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, QtResourceEditorDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, QtResourceEditorDialog, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, QtResourceEditorDialog, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, QtResourceEditorDialog, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(QtResourceEditorDialog);
|
||||
} // setupUi
|
||||
|
45
tests/auto/tools/uic/baseline/repaintslot.ui
Normal file
45
tests/auto/tools/uic/baseline/repaintslot.ui
Normal file
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Widget</class>
|
||||
<widget class="QWidget" name="Widget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Widget</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QSlider" name="verticalSlider">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>verticalSlider</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>Widget</receiver>
|
||||
<slot>repaint()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>16</x>
|
||||
<y>140</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>131</x>
|
||||
<y>149</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
59
tests/auto/tools/uic/baseline/repaintslot.ui.h
Normal file
59
tests/auto/tools/uic/baseline/repaintslot.ui.h
Normal file
@ -0,0 +1,59 @@
|
||||
/********************************************************************************
|
||||
** Form generated from reading UI file 'repaintslot.ui'
|
||||
**
|
||||
** Created by: Qt User Interface Compiler version 6.0.0
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
********************************************************************************/
|
||||
|
||||
#ifndef REPAINTSLOT_H
|
||||
#define REPAINTSLOT_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QSlider>
|
||||
#include <QtWidgets/QVBoxLayout>
|
||||
#include <QtWidgets/QWidget>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Ui_Widget
|
||||
{
|
||||
public:
|
||||
QVBoxLayout *verticalLayout;
|
||||
QSlider *verticalSlider;
|
||||
|
||||
void setupUi(QWidget *Widget)
|
||||
{
|
||||
if (Widget->objectName().isEmpty())
|
||||
Widget->setObjectName(QString::fromUtf8("Widget"));
|
||||
Widget->resize(800, 600);
|
||||
verticalLayout = new QVBoxLayout(Widget);
|
||||
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
|
||||
verticalSlider = new QSlider(Widget);
|
||||
verticalSlider->setObjectName(QString::fromUtf8("verticalSlider"));
|
||||
verticalSlider->setOrientation(Qt::Vertical);
|
||||
|
||||
verticalLayout->addWidget(verticalSlider);
|
||||
|
||||
|
||||
retranslateUi(Widget);
|
||||
QObject::connect(verticalSlider, &QSlider::valueChanged, Widget, qOverload<>(&QWidget::repaint));
|
||||
|
||||
QMetaObject::connectSlotsByName(Widget);
|
||||
} // setupUi
|
||||
|
||||
void retranslateUi(QWidget *Widget)
|
||||
{
|
||||
Widget->setWindowTitle(QCoreApplication::translate("Widget", "Widget", nullptr));
|
||||
} // retranslateUi
|
||||
|
||||
};
|
||||
|
||||
namespace Ui {
|
||||
class Widget: public Ui_Widget {};
|
||||
} // namespace Ui
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // REPAINTSLOT_H
|
@ -124,8 +124,8 @@ public:
|
||||
#endif // QT_CONFIG(shortcut)
|
||||
|
||||
retranslateUi(SaveFormAsTemplate);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, SaveFormAsTemplate, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, SaveFormAsTemplate, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, SaveFormAsTemplate, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, SaveFormAsTemplate, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(SaveFormAsTemplate);
|
||||
} // setupUi
|
||||
|
@ -175,8 +175,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(Dialog);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(Dialog);
|
||||
} // setupUi
|
||||
|
@ -143,8 +143,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(Form);
|
||||
QObject::connect(hostNameEdit, &QLineEdit::returnPressed, connectButton, &QPushButton::animateClick);
|
||||
QObject::connect(sessionInput, &QLineEdit::returnPressed, sendButton, &QPushButton::animateClick);
|
||||
QObject::connect(hostNameEdit, &QLineEdit::returnPressed, connectButton, qOverload<>(&QPushButton::animateClick));
|
||||
QObject::connect(sessionInput, &QLineEdit::returnPressed, sendButton, qOverload<>(&QPushButton::animateClick));
|
||||
|
||||
connectButton->setDefault(true);
|
||||
sendButton->setDefault(true);
|
||||
|
@ -78,8 +78,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(SslErrors);
|
||||
QObject::connect(pushButton, &QPushButton::clicked, SslErrors, &QDialog::accept);
|
||||
QObject::connect(pushButton_2, &QPushButton::clicked, SslErrors, &QDialog::reject);
|
||||
QObject::connect(pushButton, &QPushButton::clicked, SslErrors, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(pushButton_2, &QPushButton::clicked, SslErrors, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(SslErrors);
|
||||
} // setupUi
|
||||
|
@ -207,8 +207,8 @@ public:
|
||||
#endif // QT_CONFIG(shortcut)
|
||||
|
||||
retranslateUi(qdesigner_internal__Dialog);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__Dialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__Dialog, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__Dialog, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__Dialog, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(qdesigner_internal__Dialog);
|
||||
} // setupUi
|
||||
|
@ -304,8 +304,8 @@ public:
|
||||
QWidget::setTabOrder(moveRowUpButton, moveRowDownButton);
|
||||
|
||||
retranslateUi(qdesigner_internal__TableWidgetEditor);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__TableWidgetEditor, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__TableWidgetEditor, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__TableWidgetEditor, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__TableWidgetEditor, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(qdesigner_internal__TableWidgetEditor);
|
||||
} // setupUi
|
||||
|
@ -86,7 +86,7 @@ public:
|
||||
#endif // QT_CONFIG(shortcut)
|
||||
|
||||
retranslateUi(Form);
|
||||
QObject::connect(lineEdit, &QLineEdit::returnPressed, findButton, &QPushButton::animateClick);
|
||||
QObject::connect(lineEdit, &QLineEdit::returnPressed, findButton, qOverload<>(&QPushButton::animateClick));
|
||||
|
||||
QMetaObject::connectSlotsByName(Form);
|
||||
} // setupUi
|
||||
|
@ -195,7 +195,7 @@ public:
|
||||
QWidget::setTabOrder(ckMatchCase, ckMarkFinished);
|
||||
|
||||
retranslateUi(TranslateDialog);
|
||||
QObject::connect(cancel, &QPushButton::clicked, TranslateDialog, &QDialog::reject);
|
||||
QObject::connect(cancel, &QPushButton::clicked, TranslateDialog, qOverload<>(&QDialog::reject));
|
||||
|
||||
findNxt->setDefault(true);
|
||||
|
||||
|
@ -92,8 +92,8 @@ public:
|
||||
#endif // QT_CONFIG(shortcut)
|
||||
|
||||
retranslateUi(TranslationSettings);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, TranslationSettings, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, TranslationSettings, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, TranslationSettings, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, TranslationSettings, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(TranslationSettings);
|
||||
} // setupUi
|
||||
|
@ -269,8 +269,8 @@ public:
|
||||
QWidget::setTabOrder(moveColumnUpButton, moveColumnDownButton);
|
||||
|
||||
retranslateUi(qdesigner_internal__TreeWidgetEditor);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__TreeWidgetEditor, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__TreeWidgetEditor, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__TreeWidgetEditor, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__TreeWidgetEditor, qOverload<>(&QDialog::reject));
|
||||
|
||||
QMetaObject::connectSlotsByName(qdesigner_internal__TreeWidgetEditor);
|
||||
} // setupUi
|
||||
|
@ -368,7 +368,7 @@ public:
|
||||
|
||||
|
||||
retranslateUi(ValidatorsForm);
|
||||
QObject::connect(pushButton, &QPushButton::clicked, ValidatorsForm, &QWidget::close);
|
||||
QObject::connect(pushButton, &QPushButton::clicked, ValidatorsForm, qOverload<>(&QWidget::close));
|
||||
|
||||
QMetaObject::connectSlotsByName(ValidatorsForm);
|
||||
} // setupUi
|
||||
|
@ -241,8 +241,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(WateringConfigDialog);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, WateringConfigDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, WateringConfigDialog, &QDialog::reject);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, WateringConfigDialog, qOverload<>(&QDialog::accept));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, WateringConfigDialog, qOverload<>(&QDialog::reject));
|
||||
QObject::connect(temperatureCheckBox, &QCheckBox::toggled, temperatureSpinBox, &QSpinBox::setEnabled);
|
||||
QObject::connect(rainCheckBox, &QCheckBox::toggled, rainSpinBox, &QSpinBox::setEnabled);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user