Commit 97717b60 authored by Daniel Molkentin's avatar Daniel Molkentin
Browse files

class wizards: Do not qualify constructors with explicit, do not use "virtual".

Again, consistency with other existing code generators. explicit is only useful
for libraries and confuses new users. virtual is not repeated for subclasses in
Qt.
by other generators either.
parent e5ec0645
......@@ -115,13 +115,13 @@ bool FormClassWizardParameters::generateCpp(QString *header, QString *source, in
}
headerStr << " {\n" << namespaceIndent << indent << "Q_OBJECT\n"
<< namespaceIndent << "public:\n"
<< namespaceIndent << indent << "explicit " << unqualifiedClassName << "(QWidget *parent = 0);\n";
<< namespaceIndent << indent << unqualifiedClassName << "(QWidget *parent = 0);\n";
if (embedding == PointerAggregatedUiClass)
headerStr << namespaceIndent << indent << "virtual ~" << unqualifiedClassName << "();\n";
headerStr << namespaceIndent << indent << "~" << unqualifiedClassName << "();\n";
// retranslation
if (languageChange)
headerStr << '\n' << namespaceIndent << "protected:\n"
<< namespaceIndent << indent << "virtual void changeEvent(QEvent *e);\n";
<< namespaceIndent << indent << "void changeEvent(QEvent *e);\n";
// Member variable
if (embedding != InheritedUiClass) {
headerStr << '\n' << namespaceIndent << "private:\n"
......
......@@ -117,7 +117,7 @@ void LibraryParameters::generateCode(QtProjectParameters:: Type t,
}
headerStr << namespaceIndent << "public:\n";
if (inheritsQObject) {
headerStr << namespaceIndent << indent << "explicit " << unqualifiedClassName << "(QObject *parent = 0);\n";
headerStr << namespaceIndent << indent << unqualifiedClassName << "(QObject *parent = 0);\n";
} else {
headerStr << namespaceIndent << indent << unqualifiedClassName << "();\n";
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment