forked from qt-creator/qt-creator
Qt plugin wizard: Fix excess whitespace
Amends 075e1da67e
.
Fixes: QTCREATORBUG-21974
Change-Id: I4216b06ac9753e552e34575ff10f3789ff5ad8dc
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
#include <QTextStream>
|
||||
#include <QStringList>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
namespace QmakeProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
@@ -150,7 +152,7 @@ void LibraryParameters::generateCode(QtProjectParameters:: Type t,
|
||||
}
|
||||
QTC_ASSERT(nameIndex != -1, continue);
|
||||
sourceStr << '\n' << namespaceIndent << signature.left(nameIndex);
|
||||
if (signature.at(nameIndex - 1) != ' ')
|
||||
if (!std::strchr("&* ", signature.at(nameIndex - 1).toLatin1()))
|
||||
sourceStr << ' ';
|
||||
sourceStr << unqualifiedClassName << "::" << signature.mid(nameIndex) << '\n';
|
||||
sourceStr << namespaceIndent << "{\n" << indent
|
||||
|
@@ -56,7 +56,7 @@ using QSL = QStringList;
|
||||
static const PluginBaseClasses pluginBaseClasses[] =
|
||||
{
|
||||
{"QAccessiblePlugin", "QtGui",
|
||||
QSL{"QAccessibleInterface * create(const QString &key, QObject *object)"},
|
||||
QSL{"QAccessibleInterface *create(const QString &key, QObject *object)"},
|
||||
"QtCore", "accessible", "QAccessibleFactoryInterface"},
|
||||
{"QGenericPlugin", "QtGui", QSL{"QObject *create(const QString &name, const QString &spec)"},
|
||||
"QtCore", "generic", "QGenericPluginFactoryInterface"},
|
||||
|
@@ -103,7 +103,7 @@ def main():
|
||||
continue
|
||||
editor = getEditorForFileSuffix("%s.cpp" % className.lower())
|
||||
initialContent = str(editor.plainText)
|
||||
test.verify("QObject * %s::create(" % className in initialContent,
|
||||
test.verify("QObject *%s::create(" % className in initialContent,
|
||||
"Verifying whether pure virtual function has been added to the source file.")
|
||||
if not openDocument("%s.Headers.%s\.h" % (projectName, className.lower())):
|
||||
test.fatal("Could not open %s.h - continuing." % className.lower())
|
||||
@@ -131,7 +131,7 @@ def main():
|
||||
"Verifying whether event() definition has been added to the source file.")
|
||||
# add return to not run into build issues of missing return values
|
||||
addReturn(editor, "bool %s::event.*" % className, "true")
|
||||
addReturn(editor, "QObject \* %s::create.*" % className, "0")
|
||||
addReturn(editor, "QObject \*%s::create.*" % className, "0")
|
||||
placeCursorToLine(editor, 'static_assert\(false, .*', True)
|
||||
invokeContextMenuItem(editor, "Toggle Comment Selection")
|
||||
virtualFunctionsAdded = True
|
||||
|
Reference in New Issue
Block a user