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:
parent
8231614661
commit
da3cb1deb6
@ -229,6 +229,9 @@ void WriteIncludes::add(const QString &className, bool determineHeader, const QS
|
||||
return;
|
||||
}
|
||||
|
||||
if (cwi->extends(className, QLatin1String("QDialogButtonBox")))
|
||||
add(QLatin1String("QAbstractButton")); // for signal "clicked(QAbstractButton*)"
|
||||
|
||||
if (determineHeader)
|
||||
insertIncludeForClass(className, header, global);
|
||||
}
|
||||
|
@ -2568,6 +2568,31 @@ WriteInitialization::Declaration WriteInitialization::findDeclaration(const QStr
|
||||
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)
|
||||
{
|
||||
const QString senderName = connection->elementSender();
|
||||
@ -2584,14 +2609,16 @@ void WriteInitialization::acceptConnection(DomConnection *connection)
|
||||
fprintf(stderr, "%s\n", qPrintable(message));
|
||||
return;
|
||||
}
|
||||
|
||||
language::SignalSlot theSignal{senderDecl.name, connection->elementSignal(),
|
||||
const QString senderSignature = connection->elementSignal();
|
||||
language::SignalSlot theSignal{senderDecl.name, senderSignature,
|
||||
senderDecl.className};
|
||||
language::SignalSlot theSlot{receiverDecl.name, connection->elementSlot(),
|
||||
receiverDecl.className};
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,8 @@
|
||||
#include <qstack.h>
|
||||
#include <qtextstream.h>
|
||||
|
||||
enum class ConnectionSyntax;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Driver;
|
||||
@ -238,6 +240,10 @@ private:
|
||||
QString writeBrushInitialization(const DomBrush *brush);
|
||||
void addButtonGroup(const DomWidget *node, const QString &varName);
|
||||
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;
|
||||
Driver *m_driver;
|
||||
|
@ -100,6 +100,11 @@ int runUic(int argc, char *argv[])
|
||||
generatorOption.setValueName(QStringLiteral("python|cpp"));
|
||||
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"));
|
||||
idBasedOption.setDescription(QStringLiteral("Use id based function for i18n"));
|
||||
parser.addOption(idBasedOption);
|
||||
@ -122,6 +127,13 @@ int runUic(int argc, char *argv[])
|
||||
driver.option().postfix = parser.value(postfixOption);
|
||||
driver.option().translateFunction = parser.value(translateOption);
|
||||
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;
|
||||
if (parser.isSet(generatorOption)) {
|
||||
|
@ -46,6 +46,8 @@ struct Option
|
||||
unsigned int implicitIncludes: 1;
|
||||
unsigned int idBased: 1;
|
||||
unsigned int fromImports: 1;
|
||||
unsigned int forceMemberFnPtrConnectionSyntax: 1;
|
||||
unsigned int forceStringConnectionSyntax: 1;
|
||||
|
||||
QString inputFile;
|
||||
QString outputFile;
|
||||
@ -67,6 +69,8 @@ struct Option
|
||||
implicitIncludes(1),
|
||||
idBased(0),
|
||||
fromImports(0),
|
||||
forceMemberFnPtrConnectionSyntax(0),
|
||||
forceStringConnectionSyntax(0),
|
||||
prefix(QLatin1String("Ui_"))
|
||||
{ indent.fill(QLatin1Char(' '), 4); }
|
||||
|
||||
|
@ -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()) {
|
||||
case Language::Cpp:
|
||||
str << "QObject::connect(" << sender.name << ", SIGNAL("<< sender.signature
|
||||
<< "), " << receiver.name << ", SLOT("<< receiver.signature << "))";
|
||||
switch (connectionSyntax) {
|
||||
case ConnectionSyntax::MemberFunctionPtr:
|
||||
formatMemberFnPtrConnection(str, sender, receiver);
|
||||
break;
|
||||
case ConnectionSyntax::StringBased:
|
||||
formatStringBasedConnection(str, sender, receiver);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case Language::Python:
|
||||
str << sender.name << '.'
|
||||
|
@ -37,11 +37,16 @@ QT_FORWARD_DECLARE_CLASS(QTextStream)
|
||||
|
||||
enum class Language { Cpp, Python };
|
||||
|
||||
enum class ConnectionSyntax { StringBased, MemberFunctionPtr };
|
||||
|
||||
namespace language {
|
||||
|
||||
Language language();
|
||||
void setLanguage(Language);
|
||||
|
||||
ConnectionSyntax connectionSyntax();
|
||||
void setConnectionSyntax(ConnectionSyntax cs);
|
||||
|
||||
extern QString derefPointer;
|
||||
extern QString nullPtr;
|
||||
extern QString operatorNew;
|
||||
@ -198,7 +203,8 @@ struct SignalSlot
|
||||
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);
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define DIALOG_WITH_BUTTONS_BOTTOM_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -33,8 +34,8 @@ public:
|
||||
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
|
||||
|
||||
retranslateUi(Dialog);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), Dialog, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), Dialog, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(Dialog);
|
||||
} // setupUi
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define DIALOG_WITH_BUTTONS_RIGHT_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -33,8 +34,8 @@ public:
|
||||
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
|
||||
|
||||
retranslateUi(Dialog);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), Dialog, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), Dialog, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(Dialog);
|
||||
} // setupUi
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define ADDLINKDIALOG_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -89,8 +90,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(AddLinkDialog);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), AddLinkDialog, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), AddLinkDialog, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, AddLinkDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, AddLinkDialog, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(AddLinkDialog);
|
||||
} // setupUi
|
||||
|
@ -198,8 +198,8 @@ public:
|
||||
QWidget::setTabOrder(okButton, cancelButton);
|
||||
|
||||
retranslateUi(AddTorrentFile);
|
||||
QObject::connect(okButton, SIGNAL(clicked()), AddTorrentFile, SLOT(accept()));
|
||||
QObject::connect(cancelButton, SIGNAL(clicked()), AddTorrentFile, SLOT(reject()));
|
||||
QObject::connect(okButton, &QPushButton::clicked, AddTorrentFile, &QDialog::accept);
|
||||
QObject::connect(cancelButton, &QPushButton::clicked, AddTorrentFile, &QDialog::reject);
|
||||
|
||||
browseTorrents->setDefault(true);
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define AUTHENTICATIONDIALOG_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -95,8 +96,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(Dialog);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), Dialog, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), Dialog, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(Dialog);
|
||||
} // setupUi
|
||||
|
@ -136,8 +136,8 @@ public:
|
||||
QWidget::setTabOrder(groupBox_2, treeWidget);
|
||||
|
||||
retranslateUi(BackSide);
|
||||
QObject::connect(horizontalSlider, SIGNAL(valueChanged(int)), spinBox, SLOT(setValue(int)));
|
||||
QObject::connect(spinBox, SIGNAL(valueChanged(int)), horizontalSlider, SLOT(setValue(int)));
|
||||
QObject::connect(horizontalSlider, &QSlider::valueChanged, spinBox, &QSpinBox::setValue);
|
||||
QObject::connect(spinBox, &QSpinBox::valueChanged, horizontalSlider, &QSlider::setValue);
|
||||
|
||||
QMetaObject::connectSlotsByName(BackSide);
|
||||
} // setupUi
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define BOOKMARKDIALOG_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QComboBox>
|
||||
#include <QtWidgets/QDialog>
|
||||
@ -140,8 +141,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(BookmarkDialog);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), BookmarkDialog, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), BookmarkDialog, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, BookmarkDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, BookmarkDialog, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(BookmarkDialog);
|
||||
} // setupUi
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define BUG18156QTREEWIDGET_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -49,8 +50,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(Dialog);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), Dialog, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), Dialog, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(Dialog);
|
||||
} // setupUi
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define CERTIFICATEINFO_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -83,7 +84,7 @@ public:
|
||||
|
||||
|
||||
retranslateUi(CertificateInfo);
|
||||
QObject::connect(buttonBox, SIGNAL(clicked(QAbstractButton*)), CertificateInfo, SLOT(accept()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::clicked, CertificateInfo, &QDialog::accept);
|
||||
|
||||
QMetaObject::connectSlotsByName(CertificateInfo);
|
||||
} // setupUi
|
||||
|
@ -139,8 +139,8 @@ public:
|
||||
menuFile->addAction(actionQuit);
|
||||
|
||||
retranslateUi(ChatMainWindow);
|
||||
QObject::connect(messageLineEdit, SIGNAL(returnPressed()), sendButton, SLOT(animateClick()));
|
||||
QObject::connect(actionQuit, SIGNAL(triggered(bool)), ChatMainWindow, SLOT(close()));
|
||||
QObject::connect(messageLineEdit, &QLineEdit::returnPressed, sendButton, &QPushButton::animateClick);
|
||||
QObject::connect(actionQuit, &QAction::triggered, ChatMainWindow, &QMainWindow::close);
|
||||
|
||||
QMetaObject::connectSlotsByName(ChatMainWindow);
|
||||
} // setupUi
|
||||
|
@ -104,8 +104,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(NicknameDialog);
|
||||
QObject::connect(okButton, SIGNAL(clicked()), NicknameDialog, SLOT(accept()));
|
||||
QObject::connect(cancelButton, SIGNAL(clicked()), NicknameDialog, SLOT(reject()));
|
||||
QObject::connect(okButton, &QPushButton::clicked, NicknameDialog, &QDialog::accept);
|
||||
QObject::connect(cancelButton, &QPushButton::clicked, NicknameDialog, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(NicknameDialog);
|
||||
} // setupUi
|
||||
|
@ -695,8 +695,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(Config);
|
||||
QObject::connect(size_width, SIGNAL(valueChanged(int)), size_custom, SLOT(click()));
|
||||
QObject::connect(size_height, SIGNAL(valueChanged(int)), size_custom, SLOT(click()));
|
||||
QObject::connect(size_width, &QSpinBox::valueChanged, size_custom, &QRadioButton::click);
|
||||
QObject::connect(size_height, &QSpinBox::valueChanged, size_custom, &QRadioButton::click);
|
||||
|
||||
buttonOk->setDefault(true);
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define CONNECTDIALOG_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QCheckBox>
|
||||
#include <QtWidgets/QDialog>
|
||||
@ -118,8 +119,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(ConnectDialog);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), ConnectDialog, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), ConnectDialog, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, ConnectDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, ConnectDialog, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(ConnectDialog);
|
||||
} // setupUi
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define COOKIES_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -84,7 +85,7 @@ public:
|
||||
|
||||
|
||||
retranslateUi(CookiesDialog);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), CookiesDialog, SLOT(accept()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, CookiesDialog, &QDialog::accept);
|
||||
|
||||
QMetaObject::connectSlotsByName(CookiesDialog);
|
||||
} // setupUi
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define COOKIESEXCEPTIONS_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -151,7 +152,7 @@ public:
|
||||
|
||||
|
||||
retranslateUi(CookiesExceptionsDialog);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), CookiesExceptionsDialog, SLOT(accept()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, CookiesExceptionsDialog, &QDialog::accept);
|
||||
|
||||
QMetaObject::connectSlotsByName(CookiesExceptionsDialog);
|
||||
} // setupUi
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtGui/QAction>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QCheckBox>
|
||||
#include <QtWidgets/QComboBox>
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define FILTERNAMEDIALOG_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
|
@ -183,7 +183,7 @@ public:
|
||||
QWidget::setTabOrder(translations, matchCase);
|
||||
|
||||
retranslateUi(FindDialog);
|
||||
QObject::connect(cancel, SIGNAL(clicked()), FindDialog, SLOT(reject()));
|
||||
QObject::connect(cancel, &QPushButton::clicked, FindDialog, &QDialog::reject);
|
||||
|
||||
findNxt->setDefault(true);
|
||||
|
||||
|
@ -40,6 +40,7 @@
|
||||
#define FORMWINDOWSETTINGS_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -263,8 +264,8 @@ public:
|
||||
QWidget::setTabOrder(spacingFunctionLineEdit, pixmapFunctionLineEdit);
|
||||
|
||||
retranslateUi(FormWindowSettings);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), FormWindowSettings, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), FormWindowSettings, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, FormWindowSettings, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, FormWindowSettings, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(FormWindowSettings);
|
||||
} // setupUi
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define HISTORY_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -84,7 +85,7 @@ public:
|
||||
|
||||
|
||||
retranslateUi(HistoryDialog);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), HistoryDialog, SLOT(accept()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, HistoryDialog, &QDialog::accept);
|
||||
|
||||
QMetaObject::connectSlotsByName(HistoryDialog);
|
||||
} // setupUi
|
||||
|
@ -82,7 +82,7 @@ public:
|
||||
|
||||
|
||||
retranslateUi(IdentifierPage);
|
||||
QObject::connect(globalButton, SIGNAL(toggled(bool)), prefixLineEdit, SLOT(setEnabled(bool)));
|
||||
QObject::connect(globalButton, &QRadioButton::toggled, prefixLineEdit, &QLineEdit::setEnabled);
|
||||
|
||||
QMetaObject::connectSlotsByName(IdentifierPage);
|
||||
} // setupUi
|
||||
|
@ -189,7 +189,7 @@ public:
|
||||
QWidget::setTabOrder(okButton, cancelButton);
|
||||
|
||||
retranslateUi(dialog);
|
||||
QObject::connect(nameLineEdit, SIGNAL(returnPressed()), okButton, SLOT(animateClick()));
|
||||
QObject::connect(nameLineEdit, &QLineEdit::returnPressed, okButton, &QPushButton::animateClick);
|
||||
|
||||
QMetaObject::connectSlotsByName(dialog);
|
||||
} // setupUi
|
||||
|
@ -113,7 +113,7 @@ public:
|
||||
|
||||
|
||||
retranslateUi(InstallDialog);
|
||||
QObject::connect(closeButton, SIGNAL(clicked()), InstallDialog, SLOT(accept()));
|
||||
QObject::connect(closeButton, &QPushButton::clicked, InstallDialog, &QDialog::accept);
|
||||
|
||||
QMetaObject::connectSlotsByName(InstallDialog);
|
||||
} // setupUi
|
||||
|
@ -101,7 +101,7 @@ public:
|
||||
|
||||
|
||||
retranslateUi(LanguagesDialog);
|
||||
QObject::connect(okButton, SIGNAL(clicked()), LanguagesDialog, SLOT(accept()));
|
||||
QObject::connect(okButton, &QPushButton::clicked, LanguagesDialog, &QDialog::accept);
|
||||
|
||||
QMetaObject::connectSlotsByName(LanguagesDialog);
|
||||
} // setupUi
|
||||
|
@ -40,6 +40,7 @@
|
||||
#define LISTWIDGETEDITOR_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -164,8 +165,8 @@ public:
|
||||
QWidget::setTabOrder(moveItemUpButton, moveItemDownButton);
|
||||
|
||||
retranslateUi(qdesigner_internal__ListWidgetEditor);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), qdesigner_internal__ListWidgetEditor, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), qdesigner_internal__ListWidgetEditor, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__ListWidgetEditor, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__ListWidgetEditor, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(qdesigner_internal__ListWidgetEditor);
|
||||
} // setupUi
|
||||
|
@ -346,15 +346,15 @@ public:
|
||||
menuFile->addAction(action_Exit);
|
||||
|
||||
retranslateUi(MainWindow);
|
||||
QObject::connect(action_Exit, SIGNAL(triggered()), MainWindow, SLOT(close()));
|
||||
QObject::connect(chooseFromCodePoints, SIGNAL(toggled(bool)), characterRangeView, SLOT(setEnabled(bool)));
|
||||
QObject::connect(chooseFromCodePoints, SIGNAL(toggled(bool)), selectAll, SLOT(setEnabled(bool)));
|
||||
QObject::connect(chooseFromCodePoints, SIGNAL(toggled(bool)), deselectAll, SLOT(setEnabled(bool)));
|
||||
QObject::connect(chooseFromCodePoints, SIGNAL(toggled(bool)), invertSelection, SLOT(setEnabled(bool)));
|
||||
QObject::connect(chooseFromSampleFile, SIGNAL(toggled(bool)), sampleFile, SLOT(setEnabled(bool)));
|
||||
QObject::connect(chooseFromSampleFile, SIGNAL(toggled(bool)), browseSampleFile, SLOT(setEnabled(bool)));
|
||||
QObject::connect(chooseFromSampleFile, SIGNAL(toggled(bool)), charCount, SLOT(setEnabled(bool)));
|
||||
QObject::connect(chooseFromSampleFile, SIGNAL(toggled(bool)), label_5, SLOT(setEnabled(bool)));
|
||||
QObject::connect(action_Exit, &QAction::triggered, MainWindow, &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);
|
||||
QObject::connect(chooseFromCodePoints, &QRadioButton::toggled, invertSelection, &QPushButton::setEnabled);
|
||||
QObject::connect(chooseFromSampleFile, &QRadioButton::toggled, sampleFile, &QLineEdit::setEnabled);
|
||||
QObject::connect(chooseFromSampleFile, &QRadioButton::toggled, browseSampleFile, &QPushButton::setEnabled);
|
||||
QObject::connect(chooseFromSampleFile, &QRadioButton::toggled, charCount, &QLabel::setEnabled);
|
||||
QObject::connect(chooseFromSampleFile, &QRadioButton::toggled, label_5, &QLabel::setEnabled);
|
||||
|
||||
QMetaObject::connectSlotsByName(MainWindow);
|
||||
} // setupUi
|
||||
|
@ -40,6 +40,7 @@
|
||||
#define NEWACTIONDIALOG_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -151,8 +152,8 @@ public:
|
||||
QWidget::setTabOrder(editActionText, editObjectName);
|
||||
|
||||
retranslateUi(qdesigner_internal__NewActionDialog);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), qdesigner_internal__NewActionDialog, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), qdesigner_internal__NewActionDialog, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__NewActionDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__NewActionDialog, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(qdesigner_internal__NewActionDialog);
|
||||
} // setupUi
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define NEWDYNAMICPROPERTYDIALOG_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QComboBox>
|
||||
#include <QtWidgets/QDialog>
|
||||
|
@ -40,6 +40,7 @@
|
||||
#define NEWFORM_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QCheckBox>
|
||||
#include <QtWidgets/QDialog>
|
||||
|
@ -40,6 +40,7 @@
|
||||
#define ORDERDIALOG_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -122,8 +123,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(qdesigner_internal__OrderDialog);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), qdesigner_internal__OrderDialog, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), qdesigner_internal__OrderDialog, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__OrderDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__OrderDialog, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(qdesigner_internal__OrderDialog);
|
||||
} // setupUi
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtGui/QAction>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QCheckBox>
|
||||
#include <QtWidgets/QComboBox>
|
||||
|
@ -40,6 +40,7 @@
|
||||
#define PALETTEEDITOR_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -189,8 +190,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(qdesigner_internal__PaletteEditor);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), qdesigner_internal__PaletteEditor, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), qdesigner_internal__PaletteEditor, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__PaletteEditor, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__PaletteEditor, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(qdesigner_internal__PaletteEditor);
|
||||
} // setupUi
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define PASSWORDDIALOG_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -90,8 +91,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(PasswordDialog);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), PasswordDialog, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), PasswordDialog, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, PasswordDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, PasswordDialog, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(PasswordDialog);
|
||||
} // setupUi
|
||||
|
@ -40,6 +40,7 @@
|
||||
#define PLUGINDIALOG_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -104,7 +105,7 @@ public:
|
||||
|
||||
|
||||
retranslateUi(PluginDialog);
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), PluginDialog, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, PluginDialog, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(PluginDialog);
|
||||
} // setupUi
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define PREFERENCESDIALOG_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QComboBox>
|
||||
#include <QtWidgets/QDialog>
|
||||
@ -142,8 +143,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(PreferencesDialog);
|
||||
QObject::connect(m_dialogButtonBox, SIGNAL(accepted()), PreferencesDialog, SLOT(accept()));
|
||||
QObject::connect(m_dialogButtonBox, SIGNAL(rejected()), PreferencesDialog, SLOT(reject()));
|
||||
QObject::connect(m_dialogButtonBox, &QDialogButtonBox::accepted, PreferencesDialog, &QDialog::accept);
|
||||
QObject::connect(m_dialogButtonBox, &QDialogButtonBox::rejected, PreferencesDialog, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(PreferencesDialog);
|
||||
} // setupUi
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define PREVIEWDIALOGBASE_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QComboBox>
|
||||
#include <QtWidgets/QDialog>
|
||||
@ -162,8 +163,8 @@ public:
|
||||
#endif // QT_CONFIG(shortcut)
|
||||
|
||||
retranslateUi(PreviewDialogBase);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), PreviewDialogBase, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), PreviewDialogBase, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, PreviewDialogBase, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, PreviewDialogBase, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(PreviewDialogBase);
|
||||
} // setupUi
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define PROXY_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -79,8 +80,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(ProxyDialog);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), ProxyDialog, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), ProxyDialog, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, ProxyDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, ProxyDialog, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(ProxyDialog);
|
||||
} // setupUi
|
||||
|
@ -40,6 +40,7 @@
|
||||
#define QFILEDIALOG_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QComboBox>
|
||||
#include <QtWidgets/QDialog>
|
||||
|
@ -265,8 +265,8 @@ public:
|
||||
#endif // QT_CONFIG(shortcut)
|
||||
|
||||
retranslateUi(QPrintSettingsOutput);
|
||||
QObject::connect(printRange, SIGNAL(toggled(bool)), from, SLOT(setEnabled(bool)));
|
||||
QObject::connect(printRange, SIGNAL(toggled(bool)), to, SLOT(setEnabled(bool)));
|
||||
QObject::connect(printRange, &QRadioButton::toggled, from, &QSpinBox::setEnabled);
|
||||
QObject::connect(printRange, &QRadioButton::toggled, to, &QSpinBox::setEnabled);
|
||||
|
||||
tabs->setCurrentIndex(0);
|
||||
|
||||
|
@ -40,6 +40,7 @@
|
||||
#define QTGRADIENTDIALOG_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -81,8 +82,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(QtGradientDialog);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), QtGradientDialog, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), QtGradientDialog, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, QtGradientDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, QtGradientDialog, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(QtGradientDialog);
|
||||
} // setupUi
|
||||
|
@ -40,6 +40,7 @@
|
||||
#define QTGRADIENTVIEWDIALOG_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -81,8 +82,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(QtGradientViewDialog);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), QtGradientViewDialog, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), QtGradientViewDialog, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, QtGradientViewDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, QtGradientViewDialog, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(QtGradientViewDialog);
|
||||
} // setupUi
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define QTRESOURCEEDITORDIALOG_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -133,8 +134,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(QtResourceEditorDialog);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), QtResourceEditorDialog, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), QtResourceEditorDialog, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, QtResourceEditorDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, QtResourceEditorDialog, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(QtResourceEditorDialog);
|
||||
} // setupUi
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define QTTOOLBARDIALOG_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
|
@ -40,6 +40,7 @@
|
||||
#define SAVEFORMASTEMPLATE_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QComboBox>
|
||||
#include <QtWidgets/QDialog>
|
||||
@ -123,8 +124,8 @@ public:
|
||||
#endif // QT_CONFIG(shortcut)
|
||||
|
||||
retranslateUi(SaveFormAsTemplate);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), SaveFormAsTemplate, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), SaveFormAsTemplate, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, SaveFormAsTemplate, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, SaveFormAsTemplate, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(SaveFormAsTemplate);
|
||||
} // setupUi
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define SETTINGS_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QComboBox>
|
||||
#include <QtWidgets/QDialog>
|
||||
@ -174,8 +175,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(Dialog);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), Dialog, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), Dialog, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(Dialog);
|
||||
} // setupUi
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define SIGNALSLOTDIALOG_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
|
@ -143,8 +143,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(Form);
|
||||
QObject::connect(hostNameEdit, SIGNAL(returnPressed()), connectButton, SLOT(animateClick()));
|
||||
QObject::connect(sessionInput, SIGNAL(returnPressed()), sendButton, SLOT(animateClick()));
|
||||
QObject::connect(hostNameEdit, &QLineEdit::returnPressed, connectButton, &QPushButton::animateClick);
|
||||
QObject::connect(sessionInput, &QLineEdit::returnPressed, sendButton, &QPushButton::animateClick);
|
||||
|
||||
connectButton->setDefault(true);
|
||||
sendButton->setDefault(true);
|
||||
|
@ -78,8 +78,8 @@ public:
|
||||
|
||||
|
||||
retranslateUi(SslErrors);
|
||||
QObject::connect(pushButton, SIGNAL(clicked()), SslErrors, SLOT(accept()));
|
||||
QObject::connect(pushButton_2, SIGNAL(clicked()), SslErrors, SLOT(reject()));
|
||||
QObject::connect(pushButton, &QPushButton::clicked, SslErrors, &QDialog::accept);
|
||||
QObject::connect(pushButton_2, &QPushButton::clicked, SslErrors, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(SslErrors);
|
||||
} // setupUi
|
||||
|
@ -40,6 +40,7 @@
|
||||
#define STRINGLISTEDITOR_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -206,8 +207,8 @@ public:
|
||||
#endif // QT_CONFIG(shortcut)
|
||||
|
||||
retranslateUi(qdesigner_internal__Dialog);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), qdesigner_internal__Dialog, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), qdesigner_internal__Dialog, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__Dialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__Dialog, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(qdesigner_internal__Dialog);
|
||||
} // setupUi
|
||||
|
@ -40,6 +40,7 @@
|
||||
#define TABLEWIDGETEDITOR_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -303,8 +304,8 @@ public:
|
||||
QWidget::setTabOrder(moveRowUpButton, moveRowDownButton);
|
||||
|
||||
retranslateUi(qdesigner_internal__TableWidgetEditor);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), qdesigner_internal__TableWidgetEditor, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), qdesigner_internal__TableWidgetEditor, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__TableWidgetEditor, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__TableWidgetEditor, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(qdesigner_internal__TableWidgetEditor);
|
||||
} // setupUi
|
||||
|
@ -86,7 +86,7 @@ public:
|
||||
#endif // QT_CONFIG(shortcut)
|
||||
|
||||
retranslateUi(Form);
|
||||
QObject::connect(lineEdit, SIGNAL(returnPressed()), findButton, SLOT(animateClick()));
|
||||
QObject::connect(lineEdit, &QLineEdit::returnPressed, findButton, &QPushButton::animateClick);
|
||||
|
||||
QMetaObject::connectSlotsByName(Form);
|
||||
} // setupUi
|
||||
|
@ -195,7 +195,7 @@ public:
|
||||
QWidget::setTabOrder(ckMatchCase, ckMarkFinished);
|
||||
|
||||
retranslateUi(TranslateDialog);
|
||||
QObject::connect(cancel, SIGNAL(clicked()), TranslateDialog, SLOT(reject()));
|
||||
QObject::connect(cancel, &QPushButton::clicked, TranslateDialog, &QDialog::reject);
|
||||
|
||||
findNxt->setDefault(true);
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define TRANSLATIONSETTINGS_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QComboBox>
|
||||
#include <QtWidgets/QDialog>
|
||||
@ -91,8 +92,8 @@ public:
|
||||
#endif // QT_CONFIG(shortcut)
|
||||
|
||||
retranslateUi(TranslationSettings);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), TranslationSettings, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), TranslationSettings, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, TranslationSettings, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, TranslationSettings, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(TranslationSettings);
|
||||
} // setupUi
|
||||
|
@ -40,6 +40,7 @@
|
||||
#define TREEWIDGETEDITOR_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QDialogButtonBox>
|
||||
@ -268,8 +269,8 @@ public:
|
||||
QWidget::setTabOrder(moveColumnUpButton, moveColumnDownButton);
|
||||
|
||||
retranslateUi(qdesigner_internal__TreeWidgetEditor);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), qdesigner_internal__TreeWidgetEditor, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), qdesigner_internal__TreeWidgetEditor, SLOT(reject()));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__TreeWidgetEditor, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__TreeWidgetEditor, &QDialog::reject);
|
||||
|
||||
QMetaObject::connectSlotsByName(qdesigner_internal__TreeWidgetEditor);
|
||||
} // setupUi
|
||||
|
@ -368,7 +368,7 @@ public:
|
||||
|
||||
|
||||
retranslateUi(ValidatorsForm);
|
||||
QObject::connect(pushButton, SIGNAL(clicked()), ValidatorsForm, SLOT(close()));
|
||||
QObject::connect(pushButton, &QPushButton::clicked, ValidatorsForm, &QWidget::close);
|
||||
|
||||
QMetaObject::connectSlotsByName(ValidatorsForm);
|
||||
} // setupUi
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define WATERINGCONFIGDIALOG_H
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QAbstractButton>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QCheckBox>
|
||||
#include <QtWidgets/QComboBox>
|
||||
@ -240,10 +241,10 @@ public:
|
||||
|
||||
|
||||
retranslateUi(WateringConfigDialog);
|
||||
QObject::connect(buttonBox, SIGNAL(accepted()), WateringConfigDialog, SLOT(accept()));
|
||||
QObject::connect(buttonBox, SIGNAL(rejected()), WateringConfigDialog, SLOT(reject()));
|
||||
QObject::connect(temperatureCheckBox, SIGNAL(toggled(bool)), temperatureSpinBox, SLOT(setEnabled(bool)));
|
||||
QObject::connect(rainCheckBox, SIGNAL(toggled(bool)), rainSpinBox, SLOT(setEnabled(bool)));
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::accepted, WateringConfigDialog, &QDialog::accept);
|
||||
QObject::connect(buttonBox, &QDialogButtonBox::rejected, WateringConfigDialog, &QDialog::reject);
|
||||
QObject::connect(temperatureCheckBox, &QCheckBox::toggled, temperatureSpinBox, &QSpinBox::setEnabled);
|
||||
QObject::connect(rainCheckBox, &QCheckBox::toggled, rainSpinBox, &QSpinBox::setEnabled);
|
||||
|
||||
QMetaObject::connectSlotsByName(WateringConfigDialog);
|
||||
} // setupUi
|
||||
|
Loading…
x
Reference in New Issue
Block a user