uic: Generate Qt 5 connection syntax

Add a enum and formatting for member function pointer based
connections. Now preferably use member function pointer for Qt classes
or parameterless connections.

This should not require qOverload() within Qt classes after the
Signal/Slot disambiguation.

Add command line option to force either syntax for all connections.

Task-number: QTBUG-76375
Change-Id: Icdb4051e1173172a71cd536bdbc7d1ab1edf267d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Friedemann Kleint 2020-04-19 11:23:55 +02:00
parent 8231614661
commit da3cb1deb6
63 changed files with 241 additions and 99 deletions

View File

@ -229,6 +229,9 @@ void WriteIncludes::add(const QString &className, bool determineHeader, const QS
return; return;
} }
if (cwi->extends(className, QLatin1String("QDialogButtonBox")))
add(QLatin1String("QAbstractButton")); // for signal "clicked(QAbstractButton*)"
if (determineHeader) if (determineHeader)
insertIncludeForClass(className, header, global); insertIncludeForClass(className, header, global);
} }

View File

@ -2568,6 +2568,31 @@ WriteInitialization::Declaration WriteInitialization::findDeclaration(const QStr
return {}; return {};
} }
bool WriteInitialization::isCustomWidget(const QString &className) const
{
return m_uic->customWidgetsInfo()->customWidget(className) != nullptr;
}
ConnectionSyntax WriteInitialization::connectionSyntax(const QString &senderSignature,
const QString &senderClassName,
const QString &receiverClassName) const
{
if (m_option.forceMemberFnPtrConnectionSyntax)
return ConnectionSyntax::MemberFunctionPtr;
if (m_option.forceStringConnectionSyntax)
return ConnectionSyntax::StringBased;
// Auto mode: Use Qt 5 connection syntax for Qt classes and parameterless
// connections. QAxWidget is special though since it has a fake Meta object.
static const QStringList requiresStringSyntax{QStringLiteral("QAxWidget")};
if (requiresStringSyntax.contains(senderClassName)
|| requiresStringSyntax.contains(receiverClassName)) {
return ConnectionSyntax::StringBased;
}
return senderSignature.endsWith(QLatin1String("()"))
|| (!isCustomWidget(senderClassName) && !isCustomWidget(receiverClassName))
? ConnectionSyntax::MemberFunctionPtr : ConnectionSyntax::StringBased;
}
void WriteInitialization::acceptConnection(DomConnection *connection) void WriteInitialization::acceptConnection(DomConnection *connection)
{ {
const QString senderName = connection->elementSender(); const QString senderName = connection->elementSender();
@ -2584,14 +2609,16 @@ void WriteInitialization::acceptConnection(DomConnection *connection)
fprintf(stderr, "%s\n", qPrintable(message)); fprintf(stderr, "%s\n", qPrintable(message));
return; return;
} }
const QString senderSignature = connection->elementSignal();
language::SignalSlot theSignal{senderDecl.name, connection->elementSignal(), language::SignalSlot theSignal{senderDecl.name, senderSignature,
senderDecl.className}; senderDecl.className};
language::SignalSlot theSlot{receiverDecl.name, connection->elementSlot(), language::SignalSlot theSlot{receiverDecl.name, connection->elementSlot(),
receiverDecl.className}; receiverDecl.className};
m_output << m_indent; m_output << m_indent;
language::formatConnection(m_output, theSignal, theSlot); language::formatConnection(m_output, theSignal, theSlot,
connectionSyntax(senderSignature, senderDecl.className,
receiverDecl.className));
m_output << language::eol; m_output << language::eol;
} }

View File

@ -37,6 +37,8 @@
#include <qstack.h> #include <qstack.h>
#include <qtextstream.h> #include <qtextstream.h>
enum class ConnectionSyntax;
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class Driver; class Driver;
@ -238,6 +240,10 @@ private:
QString writeBrushInitialization(const DomBrush *brush); QString writeBrushInitialization(const DomBrush *brush);
void addButtonGroup(const DomWidget *node, const QString &varName); void addButtonGroup(const DomWidget *node, const QString &varName);
void addWizardPage(const QString &pageVarName, const DomWidget *page, const QString &parentWidget); void addWizardPage(const QString &pageVarName, const DomWidget *page, const QString &parentWidget);
bool isCustomWidget(const QString &className) const;
ConnectionSyntax connectionSyntax(const QString &senderSignature,
const QString &senderClassName,
const QString &receiverClassName) const;
const Uic *m_uic; const Uic *m_uic;
Driver *m_driver; Driver *m_driver;

View File

@ -100,6 +100,11 @@ int runUic(int argc, char *argv[])
generatorOption.setValueName(QStringLiteral("python|cpp")); generatorOption.setValueName(QStringLiteral("python|cpp"));
parser.addOption(generatorOption); parser.addOption(generatorOption);
QCommandLineOption connectionsOption(QStringList{QStringLiteral("c"), QStringLiteral("connections")});
connectionsOption.setDescription(QStringLiteral("Connection syntax."));
connectionsOption.setValueName(QStringLiteral("pmf|string"));
parser.addOption(connectionsOption);
QCommandLineOption idBasedOption(QStringLiteral("idbased")); QCommandLineOption idBasedOption(QStringLiteral("idbased"));
idBasedOption.setDescription(QStringLiteral("Use id based function for i18n")); idBasedOption.setDescription(QStringLiteral("Use id based function for i18n"));
parser.addOption(idBasedOption); parser.addOption(idBasedOption);
@ -122,6 +127,13 @@ int runUic(int argc, char *argv[])
driver.option().postfix = parser.value(postfixOption); driver.option().postfix = parser.value(postfixOption);
driver.option().translateFunction = parser.value(translateOption); driver.option().translateFunction = parser.value(translateOption);
driver.option().includeFile = parser.value(includeOption); driver.option().includeFile = parser.value(includeOption);
if (parser.isSet(connectionsOption)) {
const auto value = parser.value(connectionsOption);
if (value == QLatin1String("pmf"))
driver.option().forceMemberFnPtrConnectionSyntax = 1;
else if (value == QLatin1String("string"))
driver.option().forceStringConnectionSyntax = 1;
}
Language language = Language::Cpp; Language language = Language::Cpp;
if (parser.isSet(generatorOption)) { if (parser.isSet(generatorOption)) {

View File

@ -46,6 +46,8 @@ struct Option
unsigned int implicitIncludes: 1; unsigned int implicitIncludes: 1;
unsigned int idBased: 1; unsigned int idBased: 1;
unsigned int fromImports: 1; unsigned int fromImports: 1;
unsigned int forceMemberFnPtrConnectionSyntax: 1;
unsigned int forceStringConnectionSyntax: 1;
QString inputFile; QString inputFile;
QString outputFile; QString outputFile;
@ -67,6 +69,8 @@ struct Option
implicitIncludes(1), implicitIncludes(1),
idBased(0), idBased(0),
fromImports(0), fromImports(0),
forceMemberFnPtrConnectionSyntax(0),
forceStringConnectionSyntax(0),
prefix(QLatin1String("Ui_")) prefix(QLatin1String("Ui_"))
{ indent.fill(QLatin1Char(' '), 4); } { indent.fill(QLatin1Char(' '), 4); }

View File

@ -387,12 +387,57 @@ void _formatStackVariable(QTextStream &str, const char *className, QStringView v
} }
} }
void formatConnection(QTextStream &str, const SignalSlot &sender, const SignalSlot &receiver) // Format a member function for a signal slot connection
static void formatMemberFnPtr(QTextStream &str, const SignalSlot &s,
bool useQOverload = false)
{
const int parenPos = s.signature.indexOf(QLatin1Char('('));
Q_ASSERT(parenPos >= 0);
if (useQOverload) {
const auto parameters = s.signature.midRef(parenPos + 1,
s.signature.size() - parenPos - 2);
str << "qOverload<" << parameters << ">(";
}
const auto functionName = s.signature.leftRef(parenPos);
str << '&' << s.className << "::" << functionName;
if (useQOverload)
str << ')';
}
static void formatMemberFnPtrConnection(QTextStream &str,
const SignalSlot &sender,
const SignalSlot &receiver)
{
str << "QObject::connect(" << sender.name << ", ";
formatMemberFnPtr(str, sender);
str << ", " << receiver.name << ", ";
formatMemberFnPtr(str, receiver);
str << ')';
}
static void formatStringBasedConnection(QTextStream &str,
const SignalSlot &sender,
const SignalSlot &receiver)
{
str << "QObject::connect(" << sender.name << ", SIGNAL("<< sender.signature
<< "), " << receiver.name << ", SLOT(" << receiver.signature << "))";
}
void formatConnection(QTextStream &str, const SignalSlot &sender, const SignalSlot &receiver,
ConnectionSyntax connectionSyntax)
{ {
switch (language()) { switch (language()) {
case Language::Cpp: case Language::Cpp:
str << "QObject::connect(" << sender.name << ", SIGNAL("<< sender.signature switch (connectionSyntax) {
<< "), " << receiver.name << ", SLOT("<< receiver.signature << "))"; case ConnectionSyntax::MemberFunctionPtr:
formatMemberFnPtrConnection(str, sender, receiver);
break;
case ConnectionSyntax::StringBased:
formatStringBasedConnection(str, sender, receiver);
break;
}
break; break;
case Language::Python: case Language::Python:
str << sender.name << '.' str << sender.name << '.'

View File

@ -37,11 +37,16 @@ QT_FORWARD_DECLARE_CLASS(QTextStream)
enum class Language { Cpp, Python }; enum class Language { Cpp, Python };
enum class ConnectionSyntax { StringBased, MemberFunctionPtr };
namespace language { namespace language {
Language language(); Language language();
void setLanguage(Language); void setLanguage(Language);
ConnectionSyntax connectionSyntax();
void setConnectionSyntax(ConnectionSyntax cs);
extern QString derefPointer; extern QString derefPointer;
extern QString nullPtr; extern QString nullPtr;
extern QString operatorNew; extern QString operatorNew;
@ -198,7 +203,8 @@ struct SignalSlot
QString className; QString className;
}; };
void formatConnection(QTextStream &str, const SignalSlot &sender, const SignalSlot &receiver); void formatConnection(QTextStream &str, const SignalSlot &sender, const SignalSlot &receiver,
ConnectionSyntax connectionSyntax);
QString boolValue(bool v); QString boolValue(bool v);

View File

@ -10,6 +10,7 @@
#define DIALOG_WITH_BUTTONS_BOTTOM_H #define DIALOG_WITH_BUTTONS_BOTTOM_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -33,8 +34,8 @@ public:
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
retranslateUi(Dialog); retranslateUi(Dialog);
QObject::connect(buttonBox, SIGNAL(accepted()), Dialog, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), Dialog, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, &QDialog::reject);
QMetaObject::connectSlotsByName(Dialog); QMetaObject::connectSlotsByName(Dialog);
} // setupUi } // setupUi

View File

@ -10,6 +10,7 @@
#define DIALOG_WITH_BUTTONS_RIGHT_H #define DIALOG_WITH_BUTTONS_RIGHT_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -33,8 +34,8 @@ public:
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
retranslateUi(Dialog); retranslateUi(Dialog);
QObject::connect(buttonBox, SIGNAL(accepted()), Dialog, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), Dialog, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, &QDialog::reject);
QMetaObject::connectSlotsByName(Dialog); QMetaObject::connectSlotsByName(Dialog);
} // setupUi } // setupUi

View File

@ -10,6 +10,7 @@
#define ADDLINKDIALOG_H #define ADDLINKDIALOG_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -89,8 +90,8 @@ public:
retranslateUi(AddLinkDialog); retranslateUi(AddLinkDialog);
QObject::connect(buttonBox, SIGNAL(accepted()), AddLinkDialog, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, AddLinkDialog, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), AddLinkDialog, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, AddLinkDialog, &QDialog::reject);
QMetaObject::connectSlotsByName(AddLinkDialog); QMetaObject::connectSlotsByName(AddLinkDialog);
} // setupUi } // setupUi

View File

@ -198,8 +198,8 @@ public:
QWidget::setTabOrder(okButton, cancelButton); QWidget::setTabOrder(okButton, cancelButton);
retranslateUi(AddTorrentFile); retranslateUi(AddTorrentFile);
QObject::connect(okButton, SIGNAL(clicked()), AddTorrentFile, SLOT(accept())); QObject::connect(okButton, &QPushButton::clicked, AddTorrentFile, &QDialog::accept);
QObject::connect(cancelButton, SIGNAL(clicked()), AddTorrentFile, SLOT(reject())); QObject::connect(cancelButton, &QPushButton::clicked, AddTorrentFile, &QDialog::reject);
browseTorrents->setDefault(true); browseTorrents->setDefault(true);

View File

@ -10,6 +10,7 @@
#define AUTHENTICATIONDIALOG_H #define AUTHENTICATIONDIALOG_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -95,8 +96,8 @@ public:
retranslateUi(Dialog); retranslateUi(Dialog);
QObject::connect(buttonBox, SIGNAL(accepted()), Dialog, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), Dialog, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, &QDialog::reject);
QMetaObject::connectSlotsByName(Dialog); QMetaObject::connectSlotsByName(Dialog);
} // setupUi } // setupUi

View File

@ -136,8 +136,8 @@ public:
QWidget::setTabOrder(groupBox_2, treeWidget); QWidget::setTabOrder(groupBox_2, treeWidget);
retranslateUi(BackSide); retranslateUi(BackSide);
QObject::connect(horizontalSlider, SIGNAL(valueChanged(int)), spinBox, SLOT(setValue(int))); QObject::connect(horizontalSlider, &QSlider::valueChanged, spinBox, &QSpinBox::setValue);
QObject::connect(spinBox, SIGNAL(valueChanged(int)), horizontalSlider, SLOT(setValue(int))); QObject::connect(spinBox, &QSpinBox::valueChanged, horizontalSlider, &QSlider::setValue);
QMetaObject::connectSlotsByName(BackSide); QMetaObject::connectSlotsByName(BackSide);
} // setupUi } // setupUi

View File

@ -10,6 +10,7 @@
#define BOOKMARKDIALOG_H #define BOOKMARKDIALOG_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QComboBox> #include <QtWidgets/QComboBox>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
@ -140,8 +141,8 @@ public:
retranslateUi(BookmarkDialog); retranslateUi(BookmarkDialog);
QObject::connect(buttonBox, SIGNAL(accepted()), BookmarkDialog, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, BookmarkDialog, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), BookmarkDialog, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, BookmarkDialog, &QDialog::reject);
QMetaObject::connectSlotsByName(BookmarkDialog); QMetaObject::connectSlotsByName(BookmarkDialog);
} // setupUi } // setupUi

View File

@ -10,6 +10,7 @@
#define BUG18156QTREEWIDGET_H #define BUG18156QTREEWIDGET_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -49,8 +50,8 @@ public:
retranslateUi(Dialog); retranslateUi(Dialog);
QObject::connect(buttonBox, SIGNAL(accepted()), Dialog, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), Dialog, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, &QDialog::reject);
QMetaObject::connectSlotsByName(Dialog); QMetaObject::connectSlotsByName(Dialog);
} // setupUi } // setupUi

View File

@ -10,6 +10,7 @@
#define CERTIFICATEINFO_H #define CERTIFICATEINFO_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -83,7 +84,7 @@ public:
retranslateUi(CertificateInfo); retranslateUi(CertificateInfo);
QObject::connect(buttonBox, SIGNAL(clicked(QAbstractButton*)), CertificateInfo, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::clicked, CertificateInfo, &QDialog::accept);
QMetaObject::connectSlotsByName(CertificateInfo); QMetaObject::connectSlotsByName(CertificateInfo);
} // setupUi } // setupUi

View File

@ -139,8 +139,8 @@ public:
menuFile->addAction(actionQuit); menuFile->addAction(actionQuit);
retranslateUi(ChatMainWindow); retranslateUi(ChatMainWindow);
QObject::connect(messageLineEdit, SIGNAL(returnPressed()), sendButton, SLOT(animateClick())); QObject::connect(messageLineEdit, &QLineEdit::returnPressed, sendButton, &QPushButton::animateClick);
QObject::connect(actionQuit, SIGNAL(triggered(bool)), ChatMainWindow, SLOT(close())); QObject::connect(actionQuit, &QAction::triggered, ChatMainWindow, &QMainWindow::close);
QMetaObject::connectSlotsByName(ChatMainWindow); QMetaObject::connectSlotsByName(ChatMainWindow);
} // setupUi } // setupUi

View File

@ -104,8 +104,8 @@ public:
retranslateUi(NicknameDialog); retranslateUi(NicknameDialog);
QObject::connect(okButton, SIGNAL(clicked()), NicknameDialog, SLOT(accept())); QObject::connect(okButton, &QPushButton::clicked, NicknameDialog, &QDialog::accept);
QObject::connect(cancelButton, SIGNAL(clicked()), NicknameDialog, SLOT(reject())); QObject::connect(cancelButton, &QPushButton::clicked, NicknameDialog, &QDialog::reject);
QMetaObject::connectSlotsByName(NicknameDialog); QMetaObject::connectSlotsByName(NicknameDialog);
} // setupUi } // setupUi

View File

@ -695,8 +695,8 @@ public:
retranslateUi(Config); retranslateUi(Config);
QObject::connect(size_width, SIGNAL(valueChanged(int)), size_custom, SLOT(click())); QObject::connect(size_width, &QSpinBox::valueChanged, size_custom, &QRadioButton::click);
QObject::connect(size_height, SIGNAL(valueChanged(int)), size_custom, SLOT(click())); QObject::connect(size_height, &QSpinBox::valueChanged, size_custom, &QRadioButton::click);
buttonOk->setDefault(true); buttonOk->setDefault(true);

View File

@ -10,6 +10,7 @@
#define CONNECTDIALOG_H #define CONNECTDIALOG_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox> #include <QtWidgets/QCheckBox>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
@ -118,8 +119,8 @@ public:
retranslateUi(ConnectDialog); retranslateUi(ConnectDialog);
QObject::connect(buttonBox, SIGNAL(accepted()), ConnectDialog, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, ConnectDialog, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), ConnectDialog, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, ConnectDialog, &QDialog::reject);
QMetaObject::connectSlotsByName(ConnectDialog); QMetaObject::connectSlotsByName(ConnectDialog);
} // setupUi } // setupUi

View File

@ -10,6 +10,7 @@
#define COOKIES_H #define COOKIES_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -84,7 +85,7 @@ public:
retranslateUi(CookiesDialog); retranslateUi(CookiesDialog);
QObject::connect(buttonBox, SIGNAL(accepted()), CookiesDialog, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, CookiesDialog, &QDialog::accept);
QMetaObject::connectSlotsByName(CookiesDialog); QMetaObject::connectSlotsByName(CookiesDialog);
} // setupUi } // setupUi

View File

@ -10,6 +10,7 @@
#define COOKIESEXCEPTIONS_H #define COOKIESEXCEPTIONS_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -151,7 +152,7 @@ public:
retranslateUi(CookiesExceptionsDialog); retranslateUi(CookiesExceptionsDialog);
QObject::connect(buttonBox, SIGNAL(accepted()), CookiesExceptionsDialog, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, CookiesExceptionsDialog, &QDialog::accept);
QMetaObject::connectSlotsByName(CookiesExceptionsDialog); QMetaObject::connectSlotsByName(CookiesExceptionsDialog);
} // setupUi } // setupUi

View File

@ -11,6 +11,7 @@
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtGui/QAction> #include <QtGui/QAction>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox> #include <QtWidgets/QCheckBox>
#include <QtWidgets/QComboBox> #include <QtWidgets/QComboBox>

View File

@ -10,6 +10,7 @@
#define FILTERNAMEDIALOG_H #define FILTERNAMEDIALOG_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>

View File

@ -183,7 +183,7 @@ public:
QWidget::setTabOrder(translations, matchCase); QWidget::setTabOrder(translations, matchCase);
retranslateUi(FindDialog); retranslateUi(FindDialog);
QObject::connect(cancel, SIGNAL(clicked()), FindDialog, SLOT(reject())); QObject::connect(cancel, &QPushButton::clicked, FindDialog, &QDialog::reject);
findNxt->setDefault(true); findNxt->setDefault(true);

View File

@ -40,6 +40,7 @@
#define FORMWINDOWSETTINGS_H #define FORMWINDOWSETTINGS_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -263,8 +264,8 @@ public:
QWidget::setTabOrder(spacingFunctionLineEdit, pixmapFunctionLineEdit); QWidget::setTabOrder(spacingFunctionLineEdit, pixmapFunctionLineEdit);
retranslateUi(FormWindowSettings); retranslateUi(FormWindowSettings);
QObject::connect(buttonBox, SIGNAL(accepted()), FormWindowSettings, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, FormWindowSettings, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), FormWindowSettings, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, FormWindowSettings, &QDialog::reject);
QMetaObject::connectSlotsByName(FormWindowSettings); QMetaObject::connectSlotsByName(FormWindowSettings);
} // setupUi } // setupUi

View File

@ -10,6 +10,7 @@
#define HISTORY_H #define HISTORY_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -84,7 +85,7 @@ public:
retranslateUi(HistoryDialog); retranslateUi(HistoryDialog);
QObject::connect(buttonBox, SIGNAL(accepted()), HistoryDialog, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, HistoryDialog, &QDialog::accept);
QMetaObject::connectSlotsByName(HistoryDialog); QMetaObject::connectSlotsByName(HistoryDialog);
} // setupUi } // setupUi

View File

@ -82,7 +82,7 @@ public:
retranslateUi(IdentifierPage); retranslateUi(IdentifierPage);
QObject::connect(globalButton, SIGNAL(toggled(bool)), prefixLineEdit, SLOT(setEnabled(bool))); QObject::connect(globalButton, &QRadioButton::toggled, prefixLineEdit, &QLineEdit::setEnabled);
QMetaObject::connectSlotsByName(IdentifierPage); QMetaObject::connectSlotsByName(IdentifierPage);
} // setupUi } // setupUi

View File

@ -189,7 +189,7 @@ public:
QWidget::setTabOrder(okButton, cancelButton); QWidget::setTabOrder(okButton, cancelButton);
retranslateUi(dialog); retranslateUi(dialog);
QObject::connect(nameLineEdit, SIGNAL(returnPressed()), okButton, SLOT(animateClick())); QObject::connect(nameLineEdit, &QLineEdit::returnPressed, okButton, &QPushButton::animateClick);
QMetaObject::connectSlotsByName(dialog); QMetaObject::connectSlotsByName(dialog);
} // setupUi } // setupUi

View File

@ -113,7 +113,7 @@ public:
retranslateUi(InstallDialog); retranslateUi(InstallDialog);
QObject::connect(closeButton, SIGNAL(clicked()), InstallDialog, SLOT(accept())); QObject::connect(closeButton, &QPushButton::clicked, InstallDialog, &QDialog::accept);
QMetaObject::connectSlotsByName(InstallDialog); QMetaObject::connectSlotsByName(InstallDialog);
} // setupUi } // setupUi

View File

@ -101,7 +101,7 @@ public:
retranslateUi(LanguagesDialog); retranslateUi(LanguagesDialog);
QObject::connect(okButton, SIGNAL(clicked()), LanguagesDialog, SLOT(accept())); QObject::connect(okButton, &QPushButton::clicked, LanguagesDialog, &QDialog::accept);
QMetaObject::connectSlotsByName(LanguagesDialog); QMetaObject::connectSlotsByName(LanguagesDialog);
} // setupUi } // setupUi

View File

@ -40,6 +40,7 @@
#define LISTWIDGETEDITOR_H #define LISTWIDGETEDITOR_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -164,8 +165,8 @@ public:
QWidget::setTabOrder(moveItemUpButton, moveItemDownButton); QWidget::setTabOrder(moveItemUpButton, moveItemDownButton);
retranslateUi(qdesigner_internal__ListWidgetEditor); retranslateUi(qdesigner_internal__ListWidgetEditor);
QObject::connect(buttonBox, SIGNAL(accepted()), qdesigner_internal__ListWidgetEditor, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__ListWidgetEditor, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), qdesigner_internal__ListWidgetEditor, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__ListWidgetEditor, &QDialog::reject);
QMetaObject::connectSlotsByName(qdesigner_internal__ListWidgetEditor); QMetaObject::connectSlotsByName(qdesigner_internal__ListWidgetEditor);
} // setupUi } // setupUi

View File

@ -346,15 +346,15 @@ public:
menuFile->addAction(action_Exit); menuFile->addAction(action_Exit);
retranslateUi(MainWindow); retranslateUi(MainWindow);
QObject::connect(action_Exit, SIGNAL(triggered()), MainWindow, SLOT(close())); QObject::connect(action_Exit, &QAction::triggered, MainWindow, &QMainWindow::close);
QObject::connect(chooseFromCodePoints, SIGNAL(toggled(bool)), characterRangeView, SLOT(setEnabled(bool))); QObject::connect(chooseFromCodePoints, &QRadioButton::toggled, characterRangeView, &QListWidget::setEnabled);
QObject::connect(chooseFromCodePoints, SIGNAL(toggled(bool)), selectAll, SLOT(setEnabled(bool))); QObject::connect(chooseFromCodePoints, &QRadioButton::toggled, selectAll, &QPushButton::setEnabled);
QObject::connect(chooseFromCodePoints, SIGNAL(toggled(bool)), deselectAll, SLOT(setEnabled(bool))); QObject::connect(chooseFromCodePoints, &QRadioButton::toggled, deselectAll, &QPushButton::setEnabled);
QObject::connect(chooseFromCodePoints, SIGNAL(toggled(bool)), invertSelection, SLOT(setEnabled(bool))); QObject::connect(chooseFromCodePoints, &QRadioButton::toggled, invertSelection, &QPushButton::setEnabled);
QObject::connect(chooseFromSampleFile, SIGNAL(toggled(bool)), sampleFile, SLOT(setEnabled(bool))); QObject::connect(chooseFromSampleFile, &QRadioButton::toggled, sampleFile, &QLineEdit::setEnabled);
QObject::connect(chooseFromSampleFile, SIGNAL(toggled(bool)), browseSampleFile, SLOT(setEnabled(bool))); QObject::connect(chooseFromSampleFile, &QRadioButton::toggled, browseSampleFile, &QPushButton::setEnabled);
QObject::connect(chooseFromSampleFile, SIGNAL(toggled(bool)), charCount, SLOT(setEnabled(bool))); QObject::connect(chooseFromSampleFile, &QRadioButton::toggled, charCount, &QLabel::setEnabled);
QObject::connect(chooseFromSampleFile, SIGNAL(toggled(bool)), label_5, SLOT(setEnabled(bool))); QObject::connect(chooseFromSampleFile, &QRadioButton::toggled, label_5, &QLabel::setEnabled);
QMetaObject::connectSlotsByName(MainWindow); QMetaObject::connectSlotsByName(MainWindow);
} // setupUi } // setupUi

View File

@ -40,6 +40,7 @@
#define NEWACTIONDIALOG_H #define NEWACTIONDIALOG_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -151,8 +152,8 @@ public:
QWidget::setTabOrder(editActionText, editObjectName); QWidget::setTabOrder(editActionText, editObjectName);
retranslateUi(qdesigner_internal__NewActionDialog); retranslateUi(qdesigner_internal__NewActionDialog);
QObject::connect(buttonBox, SIGNAL(accepted()), qdesigner_internal__NewActionDialog, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__NewActionDialog, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), qdesigner_internal__NewActionDialog, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__NewActionDialog, &QDialog::reject);
QMetaObject::connectSlotsByName(qdesigner_internal__NewActionDialog); QMetaObject::connectSlotsByName(qdesigner_internal__NewActionDialog);
} // setupUi } // setupUi

View File

@ -10,6 +10,7 @@
#define NEWDYNAMICPROPERTYDIALOG_H #define NEWDYNAMICPROPERTYDIALOG_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QComboBox> #include <QtWidgets/QComboBox>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>

View File

@ -40,6 +40,7 @@
#define NEWFORM_H #define NEWFORM_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox> #include <QtWidgets/QCheckBox>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>

View File

@ -40,6 +40,7 @@
#define ORDERDIALOG_H #define ORDERDIALOG_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -122,8 +123,8 @@ public:
retranslateUi(qdesigner_internal__OrderDialog); retranslateUi(qdesigner_internal__OrderDialog);
QObject::connect(buttonBox, SIGNAL(accepted()), qdesigner_internal__OrderDialog, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__OrderDialog, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), qdesigner_internal__OrderDialog, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__OrderDialog, &QDialog::reject);
QMetaObject::connectSlotsByName(qdesigner_internal__OrderDialog); QMetaObject::connectSlotsByName(qdesigner_internal__OrderDialog);
} // setupUi } // setupUi

View File

@ -11,6 +11,7 @@
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtGui/QAction> #include <QtGui/QAction>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox> #include <QtWidgets/QCheckBox>
#include <QtWidgets/QComboBox> #include <QtWidgets/QComboBox>

View File

@ -40,6 +40,7 @@
#define PALETTEEDITOR_H #define PALETTEEDITOR_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -189,8 +190,8 @@ public:
retranslateUi(qdesigner_internal__PaletteEditor); retranslateUi(qdesigner_internal__PaletteEditor);
QObject::connect(buttonBox, SIGNAL(accepted()), qdesigner_internal__PaletteEditor, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__PaletteEditor, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), qdesigner_internal__PaletteEditor, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__PaletteEditor, &QDialog::reject);
QMetaObject::connectSlotsByName(qdesigner_internal__PaletteEditor); QMetaObject::connectSlotsByName(qdesigner_internal__PaletteEditor);
} // setupUi } // setupUi

View File

@ -10,6 +10,7 @@
#define PASSWORDDIALOG_H #define PASSWORDDIALOG_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -90,8 +91,8 @@ public:
retranslateUi(PasswordDialog); retranslateUi(PasswordDialog);
QObject::connect(buttonBox, SIGNAL(accepted()), PasswordDialog, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, PasswordDialog, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), PasswordDialog, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, PasswordDialog, &QDialog::reject);
QMetaObject::connectSlotsByName(PasswordDialog); QMetaObject::connectSlotsByName(PasswordDialog);
} // setupUi } // setupUi

View File

@ -40,6 +40,7 @@
#define PLUGINDIALOG_H #define PLUGINDIALOG_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -104,7 +105,7 @@ public:
retranslateUi(PluginDialog); retranslateUi(PluginDialog);
QObject::connect(buttonBox, SIGNAL(rejected()), PluginDialog, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, PluginDialog, &QDialog::reject);
QMetaObject::connectSlotsByName(PluginDialog); QMetaObject::connectSlotsByName(PluginDialog);
} // setupUi } // setupUi

View File

@ -10,6 +10,7 @@
#define PREFERENCESDIALOG_H #define PREFERENCESDIALOG_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QComboBox> #include <QtWidgets/QComboBox>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
@ -142,8 +143,8 @@ public:
retranslateUi(PreferencesDialog); retranslateUi(PreferencesDialog);
QObject::connect(m_dialogButtonBox, SIGNAL(accepted()), PreferencesDialog, SLOT(accept())); QObject::connect(m_dialogButtonBox, &QDialogButtonBox::accepted, PreferencesDialog, &QDialog::accept);
QObject::connect(m_dialogButtonBox, SIGNAL(rejected()), PreferencesDialog, SLOT(reject())); QObject::connect(m_dialogButtonBox, &QDialogButtonBox::rejected, PreferencesDialog, &QDialog::reject);
QMetaObject::connectSlotsByName(PreferencesDialog); QMetaObject::connectSlotsByName(PreferencesDialog);
} // setupUi } // setupUi

View File

@ -10,6 +10,7 @@
#define PREVIEWDIALOGBASE_H #define PREVIEWDIALOGBASE_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QComboBox> #include <QtWidgets/QComboBox>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
@ -162,8 +163,8 @@ public:
#endif // QT_CONFIG(shortcut) #endif // QT_CONFIG(shortcut)
retranslateUi(PreviewDialogBase); retranslateUi(PreviewDialogBase);
QObject::connect(buttonBox, SIGNAL(accepted()), PreviewDialogBase, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, PreviewDialogBase, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), PreviewDialogBase, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, PreviewDialogBase, &QDialog::reject);
QMetaObject::connectSlotsByName(PreviewDialogBase); QMetaObject::connectSlotsByName(PreviewDialogBase);
} // setupUi } // setupUi

View File

@ -10,6 +10,7 @@
#define PROXY_H #define PROXY_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -79,8 +80,8 @@ public:
retranslateUi(ProxyDialog); retranslateUi(ProxyDialog);
QObject::connect(buttonBox, SIGNAL(accepted()), ProxyDialog, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, ProxyDialog, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), ProxyDialog, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, ProxyDialog, &QDialog::reject);
QMetaObject::connectSlotsByName(ProxyDialog); QMetaObject::connectSlotsByName(ProxyDialog);
} // setupUi } // setupUi

View File

@ -40,6 +40,7 @@
#define QFILEDIALOG_H #define QFILEDIALOG_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QComboBox> #include <QtWidgets/QComboBox>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>

View File

@ -265,8 +265,8 @@ public:
#endif // QT_CONFIG(shortcut) #endif // QT_CONFIG(shortcut)
retranslateUi(QPrintSettingsOutput); retranslateUi(QPrintSettingsOutput);
QObject::connect(printRange, SIGNAL(toggled(bool)), from, SLOT(setEnabled(bool))); QObject::connect(printRange, &QRadioButton::toggled, from, &QSpinBox::setEnabled);
QObject::connect(printRange, SIGNAL(toggled(bool)), to, SLOT(setEnabled(bool))); QObject::connect(printRange, &QRadioButton::toggled, to, &QSpinBox::setEnabled);
tabs->setCurrentIndex(0); tabs->setCurrentIndex(0);

View File

@ -40,6 +40,7 @@
#define QTGRADIENTDIALOG_H #define QTGRADIENTDIALOG_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -81,8 +82,8 @@ public:
retranslateUi(QtGradientDialog); retranslateUi(QtGradientDialog);
QObject::connect(buttonBox, SIGNAL(accepted()), QtGradientDialog, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, QtGradientDialog, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), QtGradientDialog, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, QtGradientDialog, &QDialog::reject);
QMetaObject::connectSlotsByName(QtGradientDialog); QMetaObject::connectSlotsByName(QtGradientDialog);
} // setupUi } // setupUi

View File

@ -40,6 +40,7 @@
#define QTGRADIENTVIEWDIALOG_H #define QTGRADIENTVIEWDIALOG_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -81,8 +82,8 @@ public:
retranslateUi(QtGradientViewDialog); retranslateUi(QtGradientViewDialog);
QObject::connect(buttonBox, SIGNAL(accepted()), QtGradientViewDialog, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, QtGradientViewDialog, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), QtGradientViewDialog, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, QtGradientViewDialog, &QDialog::reject);
QMetaObject::connectSlotsByName(QtGradientViewDialog); QMetaObject::connectSlotsByName(QtGradientViewDialog);
} // setupUi } // setupUi

View File

@ -10,6 +10,7 @@
#define QTRESOURCEEDITORDIALOG_H #define QTRESOURCEEDITORDIALOG_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -133,8 +134,8 @@ public:
retranslateUi(QtResourceEditorDialog); retranslateUi(QtResourceEditorDialog);
QObject::connect(buttonBox, SIGNAL(accepted()), QtResourceEditorDialog, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, QtResourceEditorDialog, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), QtResourceEditorDialog, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, QtResourceEditorDialog, &QDialog::reject);
QMetaObject::connectSlotsByName(QtResourceEditorDialog); QMetaObject::connectSlotsByName(QtResourceEditorDialog);
} // setupUi } // setupUi

View File

@ -10,6 +10,7 @@
#define QTTOOLBARDIALOG_H #define QTTOOLBARDIALOG_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>

View File

@ -40,6 +40,7 @@
#define SAVEFORMASTEMPLATE_H #define SAVEFORMASTEMPLATE_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QComboBox> #include <QtWidgets/QComboBox>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
@ -123,8 +124,8 @@ public:
#endif // QT_CONFIG(shortcut) #endif // QT_CONFIG(shortcut)
retranslateUi(SaveFormAsTemplate); retranslateUi(SaveFormAsTemplate);
QObject::connect(buttonBox, SIGNAL(accepted()), SaveFormAsTemplate, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, SaveFormAsTemplate, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), SaveFormAsTemplate, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, SaveFormAsTemplate, &QDialog::reject);
QMetaObject::connectSlotsByName(SaveFormAsTemplate); QMetaObject::connectSlotsByName(SaveFormAsTemplate);
} // setupUi } // setupUi

View File

@ -10,6 +10,7 @@
#define SETTINGS_H #define SETTINGS_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QComboBox> #include <QtWidgets/QComboBox>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
@ -174,8 +175,8 @@ public:
retranslateUi(Dialog); retranslateUi(Dialog);
QObject::connect(buttonBox, SIGNAL(accepted()), Dialog, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), Dialog, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, &QDialog::reject);
QMetaObject::connectSlotsByName(Dialog); QMetaObject::connectSlotsByName(Dialog);
} // setupUi } // setupUi

View File

@ -10,6 +10,7 @@
#define SIGNALSLOTDIALOG_H #define SIGNALSLOTDIALOG_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>

View File

@ -143,8 +143,8 @@ public:
retranslateUi(Form); retranslateUi(Form);
QObject::connect(hostNameEdit, SIGNAL(returnPressed()), connectButton, SLOT(animateClick())); QObject::connect(hostNameEdit, &QLineEdit::returnPressed, connectButton, &QPushButton::animateClick);
QObject::connect(sessionInput, SIGNAL(returnPressed()), sendButton, SLOT(animateClick())); QObject::connect(sessionInput, &QLineEdit::returnPressed, sendButton, &QPushButton::animateClick);
connectButton->setDefault(true); connectButton->setDefault(true);
sendButton->setDefault(true); sendButton->setDefault(true);

View File

@ -78,8 +78,8 @@ public:
retranslateUi(SslErrors); retranslateUi(SslErrors);
QObject::connect(pushButton, SIGNAL(clicked()), SslErrors, SLOT(accept())); QObject::connect(pushButton, &QPushButton::clicked, SslErrors, &QDialog::accept);
QObject::connect(pushButton_2, SIGNAL(clicked()), SslErrors, SLOT(reject())); QObject::connect(pushButton_2, &QPushButton::clicked, SslErrors, &QDialog::reject);
QMetaObject::connectSlotsByName(SslErrors); QMetaObject::connectSlotsByName(SslErrors);
} // setupUi } // setupUi

View File

@ -40,6 +40,7 @@
#define STRINGLISTEDITOR_H #define STRINGLISTEDITOR_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -206,8 +207,8 @@ public:
#endif // QT_CONFIG(shortcut) #endif // QT_CONFIG(shortcut)
retranslateUi(qdesigner_internal__Dialog); retranslateUi(qdesigner_internal__Dialog);
QObject::connect(buttonBox, SIGNAL(accepted()), qdesigner_internal__Dialog, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__Dialog, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), qdesigner_internal__Dialog, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__Dialog, &QDialog::reject);
QMetaObject::connectSlotsByName(qdesigner_internal__Dialog); QMetaObject::connectSlotsByName(qdesigner_internal__Dialog);
} // setupUi } // setupUi

View File

@ -40,6 +40,7 @@
#define TABLEWIDGETEDITOR_H #define TABLEWIDGETEDITOR_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -303,8 +304,8 @@ public:
QWidget::setTabOrder(moveRowUpButton, moveRowDownButton); QWidget::setTabOrder(moveRowUpButton, moveRowDownButton);
retranslateUi(qdesigner_internal__TableWidgetEditor); retranslateUi(qdesigner_internal__TableWidgetEditor);
QObject::connect(buttonBox, SIGNAL(accepted()), qdesigner_internal__TableWidgetEditor, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__TableWidgetEditor, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), qdesigner_internal__TableWidgetEditor, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__TableWidgetEditor, &QDialog::reject);
QMetaObject::connectSlotsByName(qdesigner_internal__TableWidgetEditor); QMetaObject::connectSlotsByName(qdesigner_internal__TableWidgetEditor);
} // setupUi } // setupUi

View File

@ -86,7 +86,7 @@ public:
#endif // QT_CONFIG(shortcut) #endif // QT_CONFIG(shortcut)
retranslateUi(Form); retranslateUi(Form);
QObject::connect(lineEdit, SIGNAL(returnPressed()), findButton, SLOT(animateClick())); QObject::connect(lineEdit, &QLineEdit::returnPressed, findButton, &QPushButton::animateClick);
QMetaObject::connectSlotsByName(Form); QMetaObject::connectSlotsByName(Form);
} // setupUi } // setupUi

View File

@ -195,7 +195,7 @@ public:
QWidget::setTabOrder(ckMatchCase, ckMarkFinished); QWidget::setTabOrder(ckMatchCase, ckMarkFinished);
retranslateUi(TranslateDialog); retranslateUi(TranslateDialog);
QObject::connect(cancel, SIGNAL(clicked()), TranslateDialog, SLOT(reject())); QObject::connect(cancel, &QPushButton::clicked, TranslateDialog, &QDialog::reject);
findNxt->setDefault(true); findNxt->setDefault(true);

View File

@ -10,6 +10,7 @@
#define TRANSLATIONSETTINGS_H #define TRANSLATIONSETTINGS_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QComboBox> #include <QtWidgets/QComboBox>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
@ -91,8 +92,8 @@ public:
#endif // QT_CONFIG(shortcut) #endif // QT_CONFIG(shortcut)
retranslateUi(TranslationSettings); retranslateUi(TranslationSettings);
QObject::connect(buttonBox, SIGNAL(accepted()), TranslationSettings, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, TranslationSettings, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), TranslationSettings, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, TranslationSettings, &QDialog::reject);
QMetaObject::connectSlotsByName(TranslationSettings); QMetaObject::connectSlotsByName(TranslationSettings);
} // setupUi } // setupUi

View File

@ -40,6 +40,7 @@
#define TREEWIDGETEDITOR_H #define TREEWIDGETEDITOR_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QDialog> #include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox> #include <QtWidgets/QDialogButtonBox>
@ -268,8 +269,8 @@ public:
QWidget::setTabOrder(moveColumnUpButton, moveColumnDownButton); QWidget::setTabOrder(moveColumnUpButton, moveColumnDownButton);
retranslateUi(qdesigner_internal__TreeWidgetEditor); retranslateUi(qdesigner_internal__TreeWidgetEditor);
QObject::connect(buttonBox, SIGNAL(accepted()), qdesigner_internal__TreeWidgetEditor, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__TreeWidgetEditor, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), qdesigner_internal__TreeWidgetEditor, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__TreeWidgetEditor, &QDialog::reject);
QMetaObject::connectSlotsByName(qdesigner_internal__TreeWidgetEditor); QMetaObject::connectSlotsByName(qdesigner_internal__TreeWidgetEditor);
} // setupUi } // setupUi

View File

@ -368,7 +368,7 @@ public:
retranslateUi(ValidatorsForm); retranslateUi(ValidatorsForm);
QObject::connect(pushButton, SIGNAL(clicked()), ValidatorsForm, SLOT(close())); QObject::connect(pushButton, &QPushButton::clicked, ValidatorsForm, &QWidget::close);
QMetaObject::connectSlotsByName(ValidatorsForm); QMetaObject::connectSlotsByName(ValidatorsForm);
} // setupUi } // setupUi

View File

@ -10,6 +10,7 @@
#define WATERINGCONFIGDIALOG_H #define WATERINGCONFIGDIALOG_H
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtWidgets/QAbstractButton>
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox> #include <QtWidgets/QCheckBox>
#include <QtWidgets/QComboBox> #include <QtWidgets/QComboBox>
@ -240,10 +241,10 @@ public:
retranslateUi(WateringConfigDialog); retranslateUi(WateringConfigDialog);
QObject::connect(buttonBox, SIGNAL(accepted()), WateringConfigDialog, SLOT(accept())); QObject::connect(buttonBox, &QDialogButtonBox::accepted, WateringConfigDialog, &QDialog::accept);
QObject::connect(buttonBox, SIGNAL(rejected()), WateringConfigDialog, SLOT(reject())); QObject::connect(buttonBox, &QDialogButtonBox::rejected, WateringConfigDialog, &QDialog::reject);
QObject::connect(temperatureCheckBox, SIGNAL(toggled(bool)), temperatureSpinBox, SLOT(setEnabled(bool))); QObject::connect(temperatureCheckBox, &QCheckBox::toggled, temperatureSpinBox, &QSpinBox::setEnabled);
QObject::connect(rainCheckBox, SIGNAL(toggled(bool)), rainSpinBox, SLOT(setEnabled(bool))); QObject::connect(rainCheckBox, &QCheckBox::toggled, rainSpinBox, &QSpinBox::setEnabled);
QMetaObject::connectSlotsByName(WateringConfigDialog); QMetaObject::connectSlotsByName(WateringConfigDialog);
} // setupUi } // setupUi