From: Friedemann Kleint Date: Tue, 10 May 2011 13:19:38 +0000 (+0200) Subject: Krazy fixes (spelling, single char strings, char constants). X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ddf4b613f3ebf3799f23f51a68c00649bfb84e95;p=qt-creator-jp%2Fqt-creator-jp.git Krazy fixes (spelling, single char strings, char constants). --- diff --git a/src/app/main.cpp b/src/app/main.cpp index 356ac23749..25c8474127 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -60,9 +60,9 @@ enum { OptionIndent = 4, DescriptionIndent = 34 }; -static const char *appNameC = "Qt Creator"; -static const char *corePluginNameC = "Core"; -static const char *fixedOptionsC = +static const char appNameC[] = "Qt Creator"; +static const char corePluginNameC[] = "Core"; +static const char fixedOptionsC[] = " [OPTION]... [FILE]...\n" "Options:\n" " -help Display this help\n" @@ -70,13 +70,13 @@ static const char *fixedOptionsC = " -client Attempt to connect to already running instance\n" " -settingspath Override the default path where user settings are stored.\n"; -static const char *HELP_OPTION1 = "-h"; -static const char *HELP_OPTION2 = "-help"; -static const char *HELP_OPTION3 = "/h"; -static const char *HELP_OPTION4 = "--help"; -static const char *VERSION_OPTION = "-version"; -static const char *CLIENT_OPTION = "-client"; -static const char *SETTINGS_OPTION = "-settingspath"; +static const char HELP_OPTION1[] = "-h"; +static const char HELP_OPTION2[] = "-help"; +static const char HELP_OPTION3[] = "/h"; +static const char HELP_OPTION4[] = "--help"; +static const char VERSION_OPTION[] = "-version"; +static const char CLIENT_OPTION[] = "-client"; +static const char SETTINGS_OPTION[] = "-settingspath"; typedef QList PluginSpecSet; diff --git a/src/libs/extensionsystem/pluginmanager.cpp b/src/libs/extensionsystem/pluginmanager.cpp index a7fb64c199..fcb4c8443c 100644 --- a/src/libs/extensionsystem/pluginmanager.cpp +++ b/src/libs/extensionsystem/pluginmanager.cpp @@ -53,8 +53,8 @@ #include #endif -static const char * const C_IGNORED_PLUGINS = "Plugins/Ignored"; -static const char * const C_FORCEENABLED_PLUGINS = "Plugins/ForceEnabled"; +static const char C_IGNORED_PLUGINS[] = "Plugins/Ignored"; +static const char C_FORCEENABLED_PLUGINS[] = "Plugins/ForceEnabled"; typedef QList PluginSpecSet; diff --git a/src/libs/qmljs/qmljslink.h b/src/libs/qmljs/qmljslink.h index d136465210..886abfd4b4 100644 --- a/src/libs/qmljs/qmljslink.h +++ b/src/libs/qmljs/qmljslink.h @@ -75,7 +75,7 @@ private: void populateImportedTypes(Interpreter::TypeEnvironment *typeEnv, Document::Ptr doc); Interpreter::ObjectValue *importFileOrDirectory(Document::Ptr doc, const Interpreter::ImportInfo &importInfo); - Interpreter::ObjectValue *importNonFile(Document::Ptr doc, const Interpreter::ImportInfo &importInfo, const QString &forcedPackageName = QString::null); + Interpreter::ObjectValue *importNonFile(Document::Ptr doc, const Interpreter::ImportInfo &importInfo, const QString &forcedPackageName = QString()); void importObject(Bind *bind, const QString &name, Interpreter::ObjectValue *object, NameId *targetNamespace); bool importLibrary(Document::Ptr doc, diff --git a/src/libs/qmljs/qmljsrewriter.cpp b/src/libs/qmljs/qmljsrewriter.cpp index 67061fa4d0..6f7490c5e1 100644 --- a/src/libs/qmljs/qmljsrewriter.cpp +++ b/src/libs/qmljs/qmljsrewriter.cpp @@ -148,7 +148,7 @@ Rewriter::Range Rewriter::addBinding(AST::UiObjectInitializer *ast, UiObjectMemberList *Rewriter::searchMemberToInsertAfter(UiObjectMemberList *members, const QStringList &propertyOrder) { - const int objectDefinitionInsertionPoint = propertyOrder.indexOf(QString::null); + const int objectDefinitionInsertionPoint = propertyOrder.indexOf(QString()); UiObjectMemberList *lastObjectDef = 0; UiObjectMemberList *lastNonObjectDef = 0; @@ -181,7 +181,7 @@ UiObjectMemberList *Rewriter::searchMemberToInsertAfter(UiObjectMemberList *memb UiArrayMemberList *Rewriter::searchMemberToInsertAfter(UiArrayMemberList *members, const QStringList &propertyOrder) { - const int objectDefinitionInsertionPoint = propertyOrder.indexOf(QString::null); + const int objectDefinitionInsertionPoint = propertyOrder.indexOf(QString()); UiArrayMemberList *lastObjectDef = 0; UiArrayMemberList *lastNonObjectDef = 0; diff --git a/src/libs/qtcreatorcdbext/gdbmihelpers.cpp b/src/libs/qtcreatorcdbext/gdbmihelpers.cpp index ee3798642c..12c5c7c94d 100644 --- a/src/libs/qtcreatorcdbext/gdbmihelpers.cpp +++ b/src/libs/qtcreatorcdbext/gdbmihelpers.cpp @@ -763,7 +763,7 @@ std::string gdbmiBreakpoints(CIDebugControl *ctrl, str << '['; if (humanReadable) str << '\n'; - for (ULONG i = 0; i < breakPointCount; i++) { + for (ULONG i = 0; i < breakPointCount; ++i) { str << "{number=\"" << i << '"'; IDebugBreakpoint *bp = 0; hr = ctrl->GetBreakpointByIndex(i, &bp); diff --git a/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp b/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp index 202c0e3307..3cf70829bb 100644 --- a/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp +++ b/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp @@ -2197,7 +2197,7 @@ static inline std::vector const std::string charType = "unsigned char"; std::string errorMessage; SymbolGroup *sg = n->symbolGroup(); - for (int i = 0; i < size; i++, address++) { + for (int i = 0; i < size; ++i, ++address) { SymbolGroupNode *en = sg->addSymbol(std::string(), SymbolGroupValue::pointedToSymbolName(address, charType), std::string(), &errorMessage); if (!en) { @@ -2244,7 +2244,7 @@ std::vector if (SymbolGroupValue::verbose) { DebugPrint dp; dp << "name(); } return rc; diff --git a/src/libs/valgrind/callgrind/callgrindcontroller.cpp b/src/libs/valgrind/callgrind/callgrindcontroller.cpp index 921c96c7c6..ffcb4e8522 100644 --- a/src/libs/valgrind/callgrind/callgrindcontroller.cpp +++ b/src/libs/valgrind/callgrind/callgrindcontroller.cpp @@ -147,7 +147,7 @@ void CallgrindController::processError(QProcess::ProcessError) { QTC_ASSERT(m_process, return) const QString error = m_process->errorString(); - emit statusMessage(QString("An error occured while trying to run %1: %2").arg(CALLGRIND_CONTROL_BINARY).arg(error)); + emit statusMessage(QString("An error occurred while trying to run %1: %2").arg(CALLGRIND_CONTROL_BINARY).arg(error)); m_process->deleteLater(); m_process = 0; @@ -169,7 +169,7 @@ void CallgrindController::processFinished(int rc, QProcess::ExitStatus status) // this call went fine, we might run another task after this switch(m_lastOption) { case ResetEventCounters: - // lets dump the new resetted profiling info + // lets dump the new reset profiling info run(Dump); return; case Pause: @@ -264,7 +264,7 @@ void CallgrindController::cleanupTempFile() if (!m_tempDataFile.isEmpty() && QFile::exists(m_tempDataFile)) QFile::remove(m_tempDataFile); - m_tempDataFile = QString(); + m_tempDataFile.clear(); } } diff --git a/src/libs/valgrind/callgrind/callgrindfunction.cpp b/src/libs/valgrind/callgrind/callgrindfunction.cpp index 9c04042bba..771e5f57b5 100644 --- a/src/libs/valgrind/callgrind/callgrindfunction.cpp +++ b/src/libs/valgrind/callgrind/callgrindfunction.cpp @@ -322,7 +322,7 @@ void Function::finalize() } } } - /// now substract self cost (see @c inclusiveCost() implementation) + // now subtract self cost (see @c inclusiveCost() implementation) for(int i = 0, c = d->m_inclusiveCost.size(); i < c; ++i) { if (d->m_inclusiveCost.at(i) < d->m_selfCost.at(i)) d->m_inclusiveCost[i] = 0; diff --git a/src/libs/valgrind/callgrind/callgrindfunctioncycle.cpp b/src/libs/valgrind/callgrind/callgrindfunctioncycle.cpp index 7f2da60a1a..a12ea5546a 100644 --- a/src/libs/valgrind/callgrind/callgrindfunctioncycle.cpp +++ b/src/libs/valgrind/callgrind/callgrindfunctioncycle.cpp @@ -99,8 +99,8 @@ void FunctionCycle::setFunctions(const QVector functions) } } } - // now substract self from incl. cost (see implementation of inclusiveCost()) - /// now substract self cost (see @c inclusiveCost() implementation) + // now subtract self from incl. cost (see implementation of inclusiveCost()) + // now subtract self cost (see @c inclusiveCost() implementation) for(int i = 0, c = d->m_inclusiveCost.size(); i < c; ++i) { if (d->m_inclusiveCost.at(i) < d->m_selfCost.at(i)) d->m_inclusiveCost[i] = 0; diff --git a/src/libs/valgrind/callgrind/callgrindparser.cpp b/src/libs/valgrind/callgrind/callgrindparser.cpp index d11b152976..e540b64faf 100644 --- a/src/libs/valgrind/callgrind/callgrindparser.cpp +++ b/src/libs/valgrind/callgrind/callgrindparser.cpp @@ -334,7 +334,7 @@ void Parser::Private::parseHeader(QIODevice *device) } else if (line.startsWith("summary: ")) { QString values = getValue(line, 9); uint i = 0; - foreach(const QString value, values.split(QLatin1Char(' '), QString::SkipEmptyParts)) + foreach (const QString &value, values.split(QLatin1Char(' '), QString::SkipEmptyParts)) data->setTotalCost(i++, value.toULongLong()); } else if (!line.trimmed().isEmpty()) { // handle line and exit parseHeader diff --git a/src/plugins/analyzerbase/analyzerplugin.cpp b/src/plugins/analyzerbase/analyzerplugin.cpp index 22f50638e6..a56a40cd7b 100644 --- a/src/plugins/analyzerbase/analyzerplugin.cpp +++ b/src/plugins/analyzerbase/analyzerplugin.cpp @@ -55,7 +55,7 @@ using namespace Analyzer; using namespace Analyzer::Internal; -static const QLatin1String lastActiveToolC("Analyzer.Plugin.LastActiveTool"); +static const char lastActiveToolC[] = "Analyzer.Plugin.LastActiveTool"; AnalyzerPlugin *AnalyzerPlugin::m_instance = 0; diff --git a/src/plugins/callgrind/callgrindtool.cpp b/src/plugins/callgrind/callgrindtool.cpp index e8b5b23265..dbfb98fbb3 100644 --- a/src/plugins/callgrind/callgrindtool.cpp +++ b/src/plugins/callgrind/callgrindtool.cpp @@ -182,7 +182,7 @@ void CallgrindTool::initializeDockWidgets() Qt::BottomDockWidgetArea); QDockWidget *visDock = - am->createDockWidget(this, tr("Visualisation"), + am->createDockWidget(this, tr("Visualization"), m_callgrindWidgetHandler->visualisation(), Qt::LeftDockWidgetArea); am->mainWindow()->tabifyDockWidget(callersDock, calleesDock); diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp index 235681eba2..332d538f04 100644 --- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp @@ -216,7 +216,7 @@ bool CMakeProject::parseCMakeLists() if (file != cbpFile) m_watcher->removePath(file); - // how can we ensure that it is completly written? + // how can we ensure that it is completely written? m_watcher->addPath(cbpFile); // ToolChain diff --git a/src/plugins/coreplugin/filemanager.cpp b/src/plugins/coreplugin/filemanager.cpp index f84af4f4a3..f60c5291d0 100644 --- a/src/plugins/coreplugin/filemanager.cpp +++ b/src/plugins/coreplugin/filemanager.cpp @@ -87,13 +87,13 @@ (see addToRecentFiles() and recentFiles()). */ -static const char * const settingsGroupC = "RecentFiles"; -static const char * const filesKeyC = "Files"; -static const char * const editorsKeyC = "EditorIds"; +static const char settingsGroupC[] = "RecentFiles"; +static const char filesKeyC[] = "Files"; +static const char editorsKeyC[] = "EditorIds"; -static const char * const directoryGroupC = "Directories"; -static const char * const projectDirectoryKeyC = "Projects"; -static const char * const useProjectDirectoryKeyC = "UseProjectsDirectory"; +static const char directoryGroupC[] = "Directories"; +static const char projectDirectoryKeyC[] = "Projects"; +static const char useProjectDirectoryKeyC[] = "UseProjectsDirectory"; namespace Core { namespace Internal { diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index 105c791d94..31918dd3fe 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -1184,15 +1184,15 @@ void MainWindow::aboutToShutdown() hide(); } -static const char *settingsGroup = "MainWindow"; -static const char *colorKey = "Color"; -static const char *windowGeometryKey = "WindowGeometry"; -static const char *windowStateKey = "WindowState"; +static const char settingsGroup[] = "MainWindow"; +static const char colorKey[] = "Color"; +static const char windowGeometryKey[] = "WindowGeometry"; +static const char windowStateKey[] = "WindowState"; // TODO compat for <= 2.1, remove later -static const char *geometryKey = "Geometry"; -static const char *maxKey = "Maximized"; -static const char *fullScreenKey = "FullScreen"; +static const char geometryKey[] = "Geometry"; +static const char maxKey[] = "Maximized"; +static const char fullScreenKey[] = "FullScreen"; void MainWindow::readSettings() { diff --git a/src/plugins/coreplugin/mimedatabase.cpp b/src/plugins/coreplugin/mimedatabase.cpp index 39e399870d..8a9679573e 100644 --- a/src/plugins/coreplugin/mimedatabase.cpp +++ b/src/plugins/coreplugin/mimedatabase.cpp @@ -61,29 +61,29 @@ enum { debugMimeDB = 0 }; // XML tags in mime files -static const char *mimeInfoTagC = "mime-info"; -static const char *mimeTypeTagC = "mime-type"; -static const char *mimeTypeAttributeC = "type"; -static const char *subClassTagC = "sub-class-of"; -static const char *commentTagC = "comment"; -static const char *globTagC = "glob"; -static const char *aliasTagC = "alias"; -static const char *patternAttributeC = "pattern"; -static const char *weightAttributeC = "weight"; -static const char *localeAttributeC = "xml:lang"; - -static const char *magicTagC = "magic"; -static const char *priorityAttributeC = "priority"; -static const char *matchTagC = "match"; -static const char *matchValueAttributeC = "value"; -static const char *matchTypeAttributeC = "type"; -static const char *matchStringTypeValueC = "string"; -static const char *matchByteTypeValueC = "byte"; -static const char *matchOffsetAttributeC = "offset"; +static const char mimeInfoTagC[] = "mime-info"; +static const char mimeTypeTagC[] = "mime-type"; +static const char mimeTypeAttributeC[] = "type"; +static const char subClassTagC[] = "sub-class-of"; +static const char commentTagC[] = "comment"; +static const char globTagC[] = "glob"; +static const char aliasTagC[] = "alias"; +static const char patternAttributeC[] = "pattern"; +static const char weightAttributeC[] = "weight"; +static const char localeAttributeC[] = "xml:lang"; + +static const char magicTagC[] = "magic"; +static const char priorityAttributeC[] = "priority"; +static const char matchTagC[] = "match"; +static const char matchValueAttributeC[] = "value"; +static const char matchTypeAttributeC[] = "type"; +static const char matchStringTypeValueC[] = "string"; +static const char matchByteTypeValueC[] = "byte"; +static const char matchOffsetAttributeC[] = "offset"; // Types -static const char *textTypeC = "text/plain"; -static const char *binaryTypeC = "application/octet-stream"; +static const char textTypeC[] = "text/plain"; +static const char binaryTypeC[] = "application/octet-stream"; // UTF16 byte order marks static const char bigEndianByteOrderMarkC[] = "\xFE\xFF"; diff --git a/src/plugins/cpptools/cppfilesettingspage.cpp b/src/plugins/cpptools/cppfilesettingspage.cpp index 8463370144..7c87527e3d 100644 --- a/src/plugins/cpptools/cppfilesettingspage.cpp +++ b/src/plugins/cpptools/cppfilesettingspage.cpp @@ -56,9 +56,9 @@ #include #include -static const char *headerSuffixKeyC = "HeaderSuffix"; -static const char *sourceSuffixKeyC = "SourceSuffix"; -static const char *licenseTemplatePathKeyC = "LicenseTemplate"; +static const char headerSuffixKeyC[] = "HeaderSuffix"; +static const char sourceSuffixKeyC[] = "SourceSuffix"; +static const char licenseTemplatePathKeyC[] = "LicenseTemplate"; const char *licenseTemplateTemplate = QT_TRANSLATE_NOOP("CppTools::Internal::CppFileSettingsWidget", "/**************************************************************************\n" diff --git a/src/plugins/cvs/cvssettings.cpp b/src/plugins/cvs/cvssettings.cpp index 66f536d7a7..26f1ca7b3c 100644 --- a/src/plugins/cvs/cvssettings.cpp +++ b/src/plugins/cvs/cvssettings.cpp @@ -35,14 +35,14 @@ #include #include -static const char *groupC = "CVS"; -static const char *commandKeyC = "Command"; -static const char *rootC = "Root"; -static const char *promptToSubmitKeyC = "PromptForSubmit"; -static const char *diffOptionsKeyC = "DiffOptions"; -static const char *describeByCommitIdKeyC = "DescribeByCommitId"; -static const char *defaultDiffOptions = "-du"; -static const char *timeOutKeyC = "TimeOut"; +static const char groupC[] = "CVS"; +static const char commandKeyC[] = "Command"; +static const char rootC[] = "Root"; +static const char promptToSubmitKeyC[] = "PromptForSubmit"; +static const char diffOptionsKeyC[] = "DiffOptions"; +static const char describeByCommitIdKeyC[] = "DescribeByCommitId"; +static const char defaultDiffOptions[] = "-du"; +static const char timeOutKeyC[] = "TimeOut"; enum { defaultTimeOutS = 30 }; diff --git a/src/plugins/debugger/debuggerstreamops.cpp b/src/plugins/debugger/debuggerstreamops.cpp index 9853c9bf80..05aa64e2cb 100644 --- a/src/plugins/debugger/debuggerstreamops.cpp +++ b/src/plugins/debugger/debuggerstreamops.cpp @@ -296,7 +296,7 @@ QDataStream &operator>>(QDataStream& stream, DisassemblerLines &o) DisassemblerLines r; quint64 count; stream >> count; - for (quint64 i = 0; i < count; i++) + for (quint64 i = 0; i < count; ++i) { DisassemblerLine line; stream >> line; diff --git a/src/plugins/debugger/gdb/symbian.cpp b/src/plugins/debugger/gdb/symbian.cpp index 94377bd4a2..b758596f37 100644 --- a/src/plugins/debugger/gdb/symbian.cpp +++ b/src/plugins/debugger/gdb/symbian.cpp @@ -506,7 +506,7 @@ void Snapshot::syncThreads(ThreadsHandler *handler) const // Take advantage of direct access to cached register values. Threads threads; const unsigned count = threadInfo.size(); - for (unsigned t = 0; t < count; t++) { + for (unsigned t = 0; t < count; ++t) { ThreadData thread(t + 1); // Fake gdb thread ids starting from 1 thread.targetId = QString::number(threadInfo.at(t).id); thread.state = threadInfo.at(t).state; diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp index 44558fa648..199e313b75 100644 --- a/src/plugins/debugger/watchwindow.cpp +++ b/src/plugins/debugger/watchwindow.cpp @@ -312,7 +312,7 @@ static inline MemoryMarkupList QDebug dbg = qDebug().nospace(); dbg << rootToolTip << ' ' << address << ' ' << size << '\n'; QString name; - for (unsigned i = 0; i < size; i++) + for (unsigned i = 0; i < size; ++i) if (name != ranges.at(i).second) { dbg << ",[" << i << ' ' << ranges.at(i).first << ' ' << ranges.at(i).second << ']'; name = ranges.at(i).second; @@ -328,7 +328,7 @@ static inline MemoryMarkupList int lastColorNumber = 0; int childNumber = 0; - for (unsigned i = 0; i < size; i++) { + for (unsigned i = 0; i < size; ++i) { const ColorNumberToolTipPair &range = ranges.at(i); if (result.isEmpty() || lastColorNumber != range.first) { lastColorNumber = range.first; @@ -353,7 +353,7 @@ static inline MemoryMarkupList QDebug dbg = qDebug().nospace(); dbg << rootName << ' ' << address << ' ' << size << '\n'; QString name; - for (unsigned i = 0; i < size; i++) + for (unsigned i = 0; i < size; ++i) if (name != ranges.at(i).second) { dbg << ',' << i << ' ' << ranges.at(i).first << ' ' << ranges.at(i).second; name = ranges.at(i).second; diff --git a/src/plugins/designer/qtcreatorintegration.cpp b/src/plugins/designer/qtcreatorintegration.cpp index 928e3b93ca..f69b657290 100644 --- a/src/plugins/designer/qtcreatorintegration.cpp +++ b/src/plugins/designer/qtcreatorintegration.cpp @@ -226,7 +226,7 @@ static Function *findDeclaration(const Class *cl, const QString &functionName) // we are interested only in declarations (can be decl of method or of a field) // we are only interested in declarations of methods const Overview overview; - for (unsigned j = 0; j < mCount; j++) { // go through all members + for (unsigned j = 0; j < mCount; ++j) { // go through all members if (Declaration *decl = cl->memberAt(j)->asDeclaration()) if (Function *fun = decl->type()->asFunctionType()) { // Format signature diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 216f79abe3..c543cbf769 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -72,8 +72,8 @@ #include #include -static const char *const kGitDirectoryC = ".git"; -static const char *const kBranchIndicatorC = "# On branch"; +static const char kGitDirectoryC[] = ".git"; +static const char kBranchIndicatorC[] = "# On branch"; namespace Git { namespace Internal { diff --git a/src/plugins/git/gitorious/gitorious.cpp b/src/plugins/git/gitorious/gitorious.cpp index 386ff668b6..19324de868 100644 --- a/src/plugins/git/gitorious/gitorious.cpp +++ b/src/plugins/git/gitorious/gitorious.cpp @@ -44,11 +44,11 @@ enum { debug = 0 }; enum Protocol { ListCategoriesProtocol, ListProjectsProtocol }; -static const char *protocolPropertyC = "gitoriousProtocol"; -static const char *hostNamePropertyC = "gitoriousHost"; -static const char *pagePropertyC = "requestPage"; +static const char protocolPropertyC[] = "gitoriousProtocol"; +static const char hostNamePropertyC[] = "gitoriousHost"; +static const char pagePropertyC[] = "requestPage"; -static const char *settingsKeyC = "GitoriousHosts"; +static const char settingsKeyC[] = "GitoriousHosts"; // Gitorious paginates projects as 20 per page. It starts with page 1. enum { ProjectsPageSize = 20 }; diff --git a/src/plugins/git/gitorious/gitorioushostwizardpage.cpp b/src/plugins/git/gitorious/gitorioushostwizardpage.cpp index f100b3b559..e64b2625f1 100644 --- a/src/plugins/git/gitorious/gitorioushostwizardpage.cpp +++ b/src/plugins/git/gitorious/gitorioushostwizardpage.cpp @@ -40,8 +40,8 @@ #include #include -static const char *settingsGroupC = "Gitorious"; -static const char *selectionKeyC = "/SelectedHost"; +static const char settingsGroupC[] = "Gitorious"; +static const char selectionKeyC[] = "/SelectedHost"; namespace Gitorious { namespace Internal { diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp index 145f6c4c71..6505b1cfd6 100644 --- a/src/plugins/perforce/perforceplugin.cpp +++ b/src/plugins/perforce/perforceplugin.cpp @@ -139,32 +139,32 @@ static inline QProcessEnvironment overrideDiffEnvironmentVariable() return rc; } -static const char * const CMD_ID_PERFORCE_MENU = "Perforce.Menu"; -static const char * const CMD_ID_EDIT = "Perforce.Edit"; -static const char * const CMD_ID_ADD = "Perforce.Add"; -static const char * const CMD_ID_DELETE_FILE = "Perforce.Delete"; -static const char * const CMD_ID_OPENED = "Perforce.Opened"; -static const char * const CMD_ID_PROJECTLOG = "Perforce.ProjectLog"; -static const char * const CMD_ID_REPOSITORYLOG = "Perforce.RepositoryLog"; -static const char * const CMD_ID_REVERT = "Perforce.Revert"; -static const char * const CMD_ID_DIFF_CURRENT = "Perforce.DiffCurrent"; -static const char * const CMD_ID_DIFF_PROJECT = "Perforce.DiffProject"; -static const char * const CMD_ID_UPDATE_PROJECT = "Perforce.UpdateProject"; -static const char * const CMD_ID_REVERT_PROJECT = "Perforce.RevertProject"; -static const char * const CMD_ID_REVERT_UNCHANGED_PROJECT = "Perforce.RevertUnchangedProject"; -static const char * const CMD_ID_DIFF_ALL = "Perforce.DiffAll"; -static const char * const CMD_ID_RESOLVE = "Perforce.Resolve"; -static const char * const CMD_ID_SUBMIT = "Perforce.Submit"; -static const char * const CMD_ID_PENDING_CHANGES = "Perforce.PendingChanges"; -static const char * const CMD_ID_DESCRIBE = "Perforce.Describe"; -static const char * const CMD_ID_ANNOTATE_CURRENT = "Perforce.AnnotateCurrent"; -static const char * const CMD_ID_ANNOTATE = "Perforce.Annotate"; -static const char * const CMD_ID_FILELOG_CURRENT = "Perforce.FilelogCurrent"; -static const char * const CMD_ID_FILELOG = "Perforce.Filelog"; -static const char * const CMD_ID_UPDATEALL = "Perforce.UpdateAll"; -static const char * const CMD_ID_SEPARATOR1 = "Perforce.Separator1"; -static const char * const CMD_ID_SEPARATOR2 = "Perforce.Separator2"; -static const char * const CMD_ID_SEPARATOR3 = "Perforce.Separator3"; +static const char CMD_ID_PERFORCE_MENU[] = "Perforce.Menu"; +static const char CMD_ID_EDIT[] = "Perforce.Edit"; +static const char CMD_ID_ADD[] = "Perforce.Add"; +static const char CMD_ID_DELETE_FILE[] = "Perforce.Delete"; +static const char CMD_ID_OPENED[] = "Perforce.Opened"; +static const char CMD_ID_PROJECTLOG[] = "Perforce.ProjectLog"; +static const char CMD_ID_REPOSITORYLOG[] = "Perforce.RepositoryLog"; +static const char CMD_ID_REVERT[] = "Perforce.Revert"; +static const char CMD_ID_DIFF_CURRENT[] = "Perforce.DiffCurrent"; +static const char CMD_ID_DIFF_PROJECT[] = "Perforce.DiffProject"; +static const char CMD_ID_UPDATE_PROJECT[] = "Perforce.UpdateProject"; +static const char CMD_ID_REVERT_PROJECT[] = "Perforce.RevertProject"; +static const char CMD_ID_REVERT_UNCHANGED_PROJECT[] = "Perforce.RevertUnchangedProject"; +static const char CMD_ID_DIFF_ALL[] = "Perforce.DiffAll"; +static const char CMD_ID_RESOLVE[] = "Perforce.Resolve"; +static const char CMD_ID_SUBMIT[] = "Perforce.Submit"; +static const char CMD_ID_PENDING_CHANGES[] = "Perforce.PendingChanges"; +static const char CMD_ID_DESCRIBE[] = "Perforce.Describe"; +static const char CMD_ID_ANNOTATE_CURRENT[] = "Perforce.AnnotateCurrent"; +static const char CMD_ID_ANNOTATE[] = "Perforce.Annotate"; +static const char CMD_ID_FILELOG_CURRENT[] = "Perforce.FilelogCurrent"; +static const char CMD_ID_FILELOG[] = "Perforce.Filelog"; +static const char CMD_ID_UPDATEALL[] = "Perforce.UpdateAll"; +static const char CMD_ID_SEPARATOR1[] = "Perforce.Separator1"; +static const char CMD_ID_SEPARATOR2[] = "Perforce.Separator2"; +static const char CMD_ID_SEPARATOR3[] = "Perforce.Separator3"; //// // PerforcePlugin diff --git a/src/plugins/perforce/perforcesettings.cpp b/src/plugins/perforce/perforcesettings.cpp index d98c7a6949..aaacdb61b5 100644 --- a/src/plugins/perforce/perforcesettings.cpp +++ b/src/plugins/perforce/perforcesettings.cpp @@ -43,16 +43,16 @@ #include #include -static const char *groupC = "Perforce"; -static const char *commandKeyC = "Command"; -static const char *defaultKeyC = "Default"; -static const char *portKeyC = "Port"; -static const char *clientKeyC = "Client"; -static const char *userKeyC = "User"; -static const char *promptToSubmitKeyC = "PromptForSubmit"; -static const char *autoOpenKeyC = "PromptToOpen"; -static const char *timeOutKeyC = "TimeOut"; -static const char *logCountKeyC = "LogCount"; +static const char groupC[] = "Perforce"; +static const char commandKeyC[] = "Command"; +static const char defaultKeyC[] = "Default"; +static const char portKeyC[] = "Port"; +static const char clientKeyC[] = "Client"; +static const char userKeyC[] = "User"; +static const char promptToSubmitKeyC[] = "PromptForSubmit"; +static const char autoOpenKeyC[] = "PromptToOpen"; +static const char timeOutKeyC[] = "TimeOut"; +static const char logCountKeyC[] = "LogCount"; enum { defaultTimeOutS = 30, defaultLogCount = 1000 }; diff --git a/src/plugins/projectexplorer/abi.cpp b/src/plugins/projectexplorer/abi.cpp index e9377b423a..fd12c80bc1 100644 --- a/src/plugins/projectexplorer/abi.cpp +++ b/src/plugins/projectexplorer/abi.cpp @@ -559,7 +559,7 @@ QList Abi::abisOfBinary(const QString &path) && tmp.at(0).binaryFormat() != Abi::MachOFormat) break; - offset += (offset % 2); // ar is 2 byte alligned + offset += (offset % 2); // ar is 2 byte aligned f.seek(offset); data = f.read(1024); } diff --git a/src/plugins/projectexplorer/baseprojectwizarddialog.cpp b/src/plugins/projectexplorer/baseprojectwizarddialog.cpp index 5303f07317..871f07d56e 100644 --- a/src/plugins/projectexplorer/baseprojectwizarddialog.cpp +++ b/src/plugins/projectexplorer/baseprojectwizarddialog.cpp @@ -44,7 +44,7 @@ \brief Base class for project wizards. - Presents the introductory page and takes care of setting the folder choosen + Presents the introductory page and takes care of setting the folder chosen as default projects' folder should the user wish to do that. */ diff --git a/src/plugins/projectexplorer/buildmanager.cpp b/src/plugins/projectexplorer/buildmanager.cpp index 0bda4a0c6c..d729439ad6 100644 --- a/src/plugins/projectexplorer/buildmanager.cpp +++ b/src/plugins/projectexplorer/buildmanager.cpp @@ -366,7 +366,8 @@ void BuildManager::progressChanged() int range = d->m_watcher.progressMaximum() - d->m_watcher.progressMinimum(); if (range != 0) { int percent = (d->m_watcher.progressValue() - d->m_watcher.progressMinimum()) * 100 / range; - d->m_progressFutureInterface->setProgressValueAndText(d->m_progress * 100 + percent, msgProgress(d->m_progress, d->m_maxProgress) + "\n" + d->m_watcher.progressText()); + d->m_progressFutureInterface->setProgressValueAndText(d->m_progress * 100 + percent, msgProgress(d->m_progress, d->m_maxProgress) + + QLatin1Char('\n') + d->m_watcher.progressText()); } } @@ -376,7 +377,8 @@ void BuildManager::progressTextChanged() int percent = 0; if (range != 0) percent = (d->m_watcher.progressValue() - d->m_watcher.progressMinimum()) * 100 / range; - d->m_progressFutureInterface->setProgressValueAndText(d->m_progress*100 + percent, msgProgress(d->m_progress, d->m_maxProgress) + "\n" + d->m_watcher.progressText()); + d->m_progressFutureInterface->setProgressValueAndText(d->m_progress*100 + percent, msgProgress(d->m_progress, d->m_maxProgress) + + QLatin1Char('\n') + d->m_watcher.progressText()); } void BuildManager::nextStep() diff --git a/src/plugins/projectexplorer/customwizard/customwizard.cpp b/src/plugins/projectexplorer/customwizard/customwizard.cpp index e4ec01a835..7d0a77d4a5 100644 --- a/src/plugins/projectexplorer/customwizard/customwizard.cpp +++ b/src/plugins/projectexplorer/customwizard/customwizard.cpp @@ -382,7 +382,7 @@ static QString listWizards() QString rc; QTextStream str(&rc); CategoryWizardMap categoryWizardMap; - foreach(const Core::IWizard *w, Core::IWizard::allWizards()) + foreach (const Core::IWizard *w, Core::IWizard::allWizards()) categoryWizardMap.insert(w->category(), w); str << "### Registered wizards (" << categoryWizardMap.size() << ")\n"; // Format diff --git a/src/plugins/projectexplorer/doubletabwidget.cpp b/src/plugins/projectexplorer/doubletabwidget.cpp index 13b79e4f79..c32f950b3d 100644 --- a/src/plugins/projectexplorer/doubletabwidget.cpp +++ b/src/plugins/projectexplorer/doubletabwidget.cpp @@ -316,7 +316,7 @@ void DoubleTabWidget::mousePressEvent(QMouseEvent *event) m_tabs[m_currentIndex].currentSubTab = hit.second; update(); // todo next two lines were outside the if leading to - // unecessary (?) signal emissions? + // unnecessary (?) signal emissions? event->accept(); emit currentIndexChanged(m_currentIndex, m_tabs.at(m_currentIndex).currentSubTab); return; diff --git a/src/plugins/projectexplorer/miniprojecttargetselector.cpp b/src/plugins/projectexplorer/miniprojecttargetselector.cpp index 0aa344baeb..69bd2687ab 100644 --- a/src/plugins/projectexplorer/miniprojecttargetselector.cpp +++ b/src/plugins/projectexplorer/miniprojecttargetselector.cpp @@ -447,7 +447,7 @@ void MiniProjectTargetSelector::mousePressEvent(QMouseEvent *e) QString MiniProjectTargetSelector::fullName(ProjectExplorer::Project *project) { - return project->displayName() + " (" + project->file()->fileName() + ")"; + return project->displayName() + " (" + project->file()->fileName() + QLatin1Char(')'); } void MiniProjectTargetSelector::addProject(ProjectExplorer::Project *project) diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index d477e38c3b..e18139dfd7 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -152,8 +152,8 @@ namespace { bool debug = false; } -static const char * const kCurrentProjectPath = "CurrentProject:Path"; -static const char * const kCurrentProjectFilePath = "CurrentProject:FilePath"; +static const char kCurrentProjectPath[] = "CurrentProject:Path"; +static const char kCurrentProjectFilePath[] = "CurrentProject:FilePath"; namespace ProjectExplorer { diff --git a/src/plugins/projectexplorer/projectfilewizardextension.cpp b/src/plugins/projectexplorer/projectfilewizardextension.cpp index a8f9375fd8..fee4502948 100644 --- a/src/plugins/projectexplorer/projectfilewizardextension.cpp +++ b/src/plugins/projectexplorer/projectfilewizardextension.cpp @@ -250,7 +250,7 @@ static int findMatchingProject(const QList &projects, static QString generatedProjectFilePath(const QList &files) { - foreach (const Core::GeneratedFile file, files) + foreach (const Core::GeneratedFile &file, files) if (file.attributes() & Core::GeneratedFile::OpenProjectAttribute) return file.path(); return QString(); diff --git a/src/plugins/projectexplorer/toolchain.cpp b/src/plugins/projectexplorer/toolchain.cpp index 5979f62fa1..d0a2754a58 100644 --- a/src/plugins/projectexplorer/toolchain.cpp +++ b/src/plugins/projectexplorer/toolchain.cpp @@ -39,8 +39,8 @@ #include -static const char *const ID_KEY = "ProjectExplorer.ToolChain.Id"; -static const char *const DISPLAY_NAME_KEY = "ProjectExplorer.ToolChain.DisplayName"; +static const char ID_KEY[] = "ProjectExplorer.ToolChain.Id"; +static const char DISPLAY_NAME_KEY[] = "ProjectExplorer.ToolChain.DisplayName"; namespace ProjectExplorer { namespace Internal { diff --git a/src/plugins/projectexplorer/toolchainmanager.cpp b/src/plugins/projectexplorer/toolchainmanager.cpp index cb774883eb..7c3cb85ee0 100644 --- a/src/plugins/projectexplorer/toolchainmanager.cpp +++ b/src/plugins/projectexplorer/toolchainmanager.cpp @@ -44,13 +44,13 @@ #include #include -static const char *const TOOLCHAIN_DATA_KEY = "ToolChain."; -static const char *const TOOLCHAIN_COUNT_KEY = "ToolChain.Count"; -static const char *const TOOLCHAIN_FILE_VERSION_KEY = "Version"; -static const char *const DEFAULT_DEBUGGER_COUNT_KEY = "DefaultDebugger.Count"; -static const char *const DEFAULT_DEBUGGER_ABI_KEY = "DefaultDebugger.Abi."; -static const char *const DEFAULT_DEBUGGER_PATH_KEY = "DefaultDebugger.Path."; -static const char *const TOOLCHAIN_FILENAME = "/toolChains.xml"; +static const char TOOLCHAIN_DATA_KEY[] = "ToolChain."; +static const char TOOLCHAIN_COUNT_KEY[] = "ToolChain.Count"; +static const char TOOLCHAIN_FILE_VERSION_KEY[] = "Version"; +static const char DEFAULT_DEBUGGER_COUNT_KEY[] = "DefaultDebugger.Count"; +static const char DEFAULT_DEBUGGER_ABI_KEY[] = "DefaultDebugger.Abi."; +static const char DEFAULT_DEBUGGER_PATH_KEY[] = "DefaultDebugger.Path."; +static const char TOOLCHAIN_FILENAME[] = "/toolChains.xml"; static QString settingsFileName() { diff --git a/src/plugins/projectexplorer/userfileaccessor.cpp b/src/plugins/projectexplorer/userfileaccessor.cpp index 51fa4a19dd..8f07cec4a7 100644 --- a/src/plugins/projectexplorer/userfileaccessor.cpp +++ b/src/plugins/projectexplorer/userfileaccessor.cpp @@ -1842,7 +1842,7 @@ static QVariant version8VarNodeTransform(const QVariant &var) }; static QSet map; if (map.isEmpty()) - for (unsigned i = 0; i < sizeof(vars)/sizeof(vars[0]); i++) + for (unsigned i = 0; i < sizeof(vars)/sizeof(vars[0]); ++i) map.insert(QLatin1String("CURRENT_DOCUMENT:") + QLatin1String(vars[i])); QString str = var.toString(); diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp index e60c32d119..4b5c64a783 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp @@ -281,7 +281,7 @@ QList ItemLibraryWidget::createToolBarWidgets() { QList buttons; - return buttons; //import managment gets disabled for now (TODO ###) + return buttons; //import management gets disabled for now (TODO ###) buttons << new QToolButton(); buttons.first()->setText("I "); diff --git a/src/plugins/qmldesigner/designercore/instances/componentnodeinstance.cpp b/src/plugins/qmldesigner/designercore/instances/componentnodeinstance.cpp index 1da06fafbd..f3dc0c8b74 100644 --- a/src/plugins/qmldesigner/designercore/instances/componentnodeinstance.cpp +++ b/src/plugins/qmldesigner/designercore/instances/componentnodeinstance.cpp @@ -84,7 +84,8 @@ void ComponentNodeInstance::setPropertyVariant(const QString &name, const QVaria data.prepend(importArray); data.append("\n"); - component()->setData(data, QUrl(nodeInstanceServer()->fileUrl().toString() + "_"+ id())); + component()->setData(data, QUrl(nodeInstanceServer()->fileUrl().toString() + + QLatin1Char('_')+ id())); setId(id()); } diff --git a/src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp b/src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp index f949c905a4..ed9d73d3ff 100644 --- a/src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp +++ b/src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp @@ -79,7 +79,7 @@ static QList parseNumbersList(QString::const_iterator &itr) ++itr; while ((*itr).isNumber() || (*itr) == '-' || (*itr) == '+' || (*itr) == '.') { - temp = QString(); + temp.clear(); if ((*itr) == '-') temp += *itr++; @@ -589,7 +589,7 @@ void Context2D::setFont(const QString &fontString) { QFont font; // ### this is simplified and incomplete - QStringList tokens = fontString.split(" "); + QStringList tokens = fontString.split(QLatin1Char(' ')); foreach (const QString &token, tokens) { if (token == QLatin1String("italic")) font.setItalic(true); diff --git a/src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas.cpp b/src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas.cpp index 9e8f52a9a3..e0c06133ce 100644 --- a/src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas.cpp +++ b/src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas.cpp @@ -154,7 +154,7 @@ QPixmap TiledCanvas::getTile(int xx, int yy) pix.fill(Qt::green); - QString text = QString::number(xx) + " " + QString::number(yy); + QString text = QString::number(xx) + QLatin1Char(' ') + QString::number(yy); QPainter p(&pix); p.drawText(pix.rect(), Qt::AlignHCenter | Qt::AlignVCenter, text); diff --git a/src/plugins/qmlprofiler/qmlprofilersummaryview.cpp b/src/plugins/qmlprofiler/qmlprofilersummaryview.cpp index 342d934299..0806961515 100644 --- a/src/plugins/qmlprofiler/qmlprofilersummaryview.cpp +++ b/src/plugins/qmlprofiler/qmlprofilersummaryview.cpp @@ -143,9 +143,10 @@ void QmlProfilerSummaryView::addRangedEvent(int type, qint64 startTime, qint64 l if (fileName.isEmpty()) return; + const QChar colon = QLatin1Char(':'); QString localName = QUrl(fileName).toLocalFile(); - QString displayName = localName.mid(localName.lastIndexOf(QChar('/'))+1)+QLatin1String(":")+QString::number(line); - QString location = fileName+":"+QString::number(line); + QString displayName = localName.mid(localName.lastIndexOf(QChar('/'))+1)+colon+QString::number(line); + QString location = fileName+colon+QString::number(line); QHash::iterator it = d->m_bindingHash.find(location); if (it != d->m_bindingHash.end()) { @@ -225,7 +226,7 @@ void QmlProfilerSummaryView::appendRow(const QString &displayName, double maxTime, double minTime) { - QString location =fileName+":"+QString::number(line); + QString location =fileName+QLatin1Char(':')+QString::number(line); ProfilerItem *locationColumn = new ProfilerItem(displayName); locationColumn->setData(QVariant(location),Qt::UserRole+1); locationColumn->setData(QVariant(fileName),Qt::UserRole+2); diff --git a/src/plugins/qmlprofiler/timelineview.cpp b/src/plugins/qmlprofiler/timelineview.cpp index bb27aca4eb..102000e686 100644 --- a/src/plugins/qmlprofiler/timelineview.cpp +++ b/src/plugins/qmlprofiler/timelineview.cpp @@ -205,7 +205,7 @@ void TimelineView::updateTimeline(bool updateStartX) QVariantList list = m_ranges.property(i).property("label").toVariant().value(); for (int i = 0; i < list.size(); ++i) { if (i > 0) - label += "\n"; + label += QLatin1Char('\n'); QString sub = list.at(i).toString(); //### only do rewrite for bindings... diff --git a/src/plugins/qt4projectmanager/qt-s60/s60publisherovi.cpp b/src/plugins/qt4projectmanager/qt-s60/s60publisherovi.cpp index 9d4cac6cca..4118f76cc2 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60publisherovi.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60publisherovi.cpp @@ -393,7 +393,7 @@ void S60PublisherOvi::endBuild(int result) if (m_qt4bc->qtVersion()->qtVersion() == QtVersionNumber(4,6,3) ) fileNamePostFix = QLatin1String("_installer.sis"); - QString resultFile = m_qt4bc->buildDirectory() + "/" + m_qt4project->displayName() + fileNamePostFix; + QString resultFile = m_qt4bc->buildDirectory() + QLatin1Char('/') + m_qt4project->displayName() + fileNamePostFix; QFileInfo fi(resultFile); if (result == QProcess::NormalExit && fi.exists()) { diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.cpp b/src/plugins/qt4projectmanager/qt4projectmanager.cpp index 8f57ccda88..5c5c7cfb76 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanager.cpp +++ b/src/plugins/qt4projectmanager/qt4projectmanager.cpp @@ -77,7 +77,7 @@ using ProjectExplorer::FormType; using ProjectExplorer::ResourceType; using ProjectExplorer::UnknownFileType; -static const char * const kInstallBins = "CurrentProject:QT_INSTALL_BINS"; +static const char kInstallBins[] = "CurrentProject:QT_INSTALL_BINS"; // Known file types of a Qt 4 project static const char* qt4FileTypes[] = { diff --git a/src/plugins/qt4projectmanager/qt4target.cpp b/src/plugins/qt4projectmanager/qt4target.cpp index 17307522d0..7ca0a325e3 100644 --- a/src/plugins/qt4projectmanager/qt4target.cpp +++ b/src/plugins/qt4projectmanager/qt4target.cpp @@ -1054,7 +1054,7 @@ QList BuildConfigurationInfo::importBuildConfigurations( if (!result.isEmpty()) return result; - // Check for builds in build directoy + // Check for builds in build directory QList factories = ExtensionSystem::PluginManager::instance()->getObjects(); foreach (Qt4BaseTargetFactory *factory, factories) { diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp index 9d03cae3b5..bdfe0c8cda 100644 --- a/src/plugins/qt4projectmanager/qtversionmanager.cpp +++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp @@ -91,9 +91,9 @@ using namespace Qt4ProjectManager::Internal; using ProjectExplorer::DebuggingHelperLibrary; -static const char *QtVersionsSectionName = "QtVersions"; -static const char *newQtVersionsKey = "NewQtVersions"; -static const char *PATH_AUTODETECTION_SOURCE = "PATH"; +static const char QtVersionsSectionName[] = "QtVersions"; +static const char newQtVersionsKey[] = "NewQtVersions"; +static const char PATH_AUTODETECTION_SOURCE[] = "PATH"; enum { debug = 0 }; diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp b/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp index 3aff9ef77d..3a9088adcb 100644 --- a/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp +++ b/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp @@ -52,20 +52,20 @@ #include -static const char *mainSourceFileC = "main"; -static const char *mainSourceShowC = " w.show();\n"; -static const char *mainSourceMobilityShowC = "#if defined(Q_WS_S60)\n" +static const char mainSourceFileC[] = "main"; +static const char mainSourceShowC[] = " w.show();\n"; +static const char mainSourceMobilityShowC[] = "#if defined(Q_WS_S60)\n" " w.showMaximized();\n" "#else\n" " w.show();\n" "#endif\n"; -static const char *mainWindowUiContentsC = +static const char mainWindowUiContentsC[] = "\n " "\n " "\n " "\n "; -static const char *mainWindowMobileUiContentsC = +static const char mainWindowMobileUiContentsC[] = "\n "; static const char *baseClassesC[] = { "QMainWindow", "QWidget", "QDialog" }; diff --git a/src/plugins/regexp/regexpwindow.cpp b/src/plugins/regexp/regexpwindow.cpp index 47b1fc93e9..7497409e09 100644 --- a/src/plugins/regexp/regexpwindow.cpp +++ b/src/plugins/regexp/regexpwindow.cpp @@ -145,8 +145,8 @@ RegExpWindow::RegExpWindow(QWidget *parent) : refresh(); } -static const char *escapedBackSlash = "\\\\"; -static const char *escapedDoubleQuote = "\\\""; +static const char escapedBackSlash[] = "\\\\"; +static const char escapedDoubleQuote[] = "\\\""; static QString escapePattern(const QString &pattern) { diff --git a/src/plugins/regexp/settings.cpp b/src/plugins/regexp/settings.cpp index 29861b22f8..18c0820068 100644 --- a/src/plugins/regexp/settings.cpp +++ b/src/plugins/regexp/settings.cpp @@ -34,16 +34,16 @@ #include -static const char *syntaxKey = "Syntax"; -static const char *minimalKey = "Minimal"; -static const char *caseSensitiveKey = "CaseSensitive"; -static const char *patternKey = "Patterns"; -static const char *currentPatternKey = "CurrentPattern"; -static const char *matchKey = "Matches"; -static const char *currentMatchKey = "CurrentMatch"; -static const char *patternDefault = "[A-Za-z_]+([A-Za-z_0-9]*)"; -static const char *matchDefault = "(10 + delta4) * 32"; -static const char *settingsGroup = "RegExp"; +static const char syntaxKey[] = "Syntax"; +static const char minimalKey[] = "Minimal"; +static const char caseSensitiveKey[] = "CaseSensitive"; +static const char patternKey[] = "Patterns"; +static const char currentPatternKey[] = "CurrentPattern"; +static const char matchKey[] = "Matches"; +static const char currentMatchKey[] = "CurrentMatch"; +static const char patternDefault[] = "[A-Za-z_]+([A-Za-z_0-9]*)"; +static const char matchDefault[] = "(10 + delta4) * 32"; +static const char settingsGroup[] = "RegExp"; namespace RegExp { namespace Internal { diff --git a/src/plugins/texteditor/behaviorsettings.cpp b/src/plugins/texteditor/behaviorsettings.cpp index 16969a823d..1a45854a68 100644 --- a/src/plugins/texteditor/behaviorsettings.cpp +++ b/src/plugins/texteditor/behaviorsettings.cpp @@ -37,9 +37,9 @@ #include #include -static const char * const mouseNavigationKey = "MouseNavigation"; -static const char * const scrollWheelZoomingKey = "ScrollWheelZooming"; -static const char * const groupPostfix = "BehaviorSettings"; +static const char mouseNavigationKey[] = "MouseNavigation"; +static const char scrollWheelZoomingKey[] = "ScrollWheelZooming"; +static const char groupPostfix[] = "BehaviorSettings"; namespace TextEditor { diff --git a/src/plugins/texteditor/colorscheme.cpp b/src/plugins/texteditor/colorscheme.cpp index ac917f7adb..7837b0703a 100644 --- a/src/plugins/texteditor/colorscheme.cpp +++ b/src/plugins/texteditor/colorscheme.cpp @@ -42,7 +42,7 @@ using namespace TextEditor; -static const char *trueString = "true"; +static const char trueString[] = "true"; // Format diff --git a/src/plugins/texteditor/completionsettings.cpp b/src/plugins/texteditor/completionsettings.cpp index ea49635a91..d72bd1acf8 100644 --- a/src/plugins/texteditor/completionsettings.cpp +++ b/src/plugins/texteditor/completionsettings.cpp @@ -34,12 +34,12 @@ #include -static const char * const groupPostfix = "Completion"; -static const char * const caseSensitivityKey = "CaseSensitivity"; -static const char * const completionTriggerKey = "CompletionTrigger"; -static const char * const autoInsertBracesKey = "AutoInsertBraces"; -static const char * const partiallyCompleteKey = "PartiallyComplete"; -static const char * const spaceAfterFunctionNameKey = "SpaceAfterFunctionName"; +static const char groupPostfix[] = "Completion"; +static const char caseSensitivityKey[] = "CaseSensitivity"; +static const char completionTriggerKey[] = "CompletionTrigger"; +static const char autoInsertBracesKey[] = "AutoInsertBraces"; +static const char partiallyCompleteKey[] = "PartiallyComplete"; +static const char spaceAfterFunctionNameKey[] = "SpaceAfterFunctionName"; using namespace TextEditor; diff --git a/src/plugins/texteditor/displaysettings.cpp b/src/plugins/texteditor/displaysettings.cpp index 680b7c2caf..ae3165945e 100644 --- a/src/plugins/texteditor/displaysettings.cpp +++ b/src/plugins/texteditor/displaysettings.cpp @@ -35,19 +35,19 @@ #include #include -static const char * const displayLineNumbersKey = "DisplayLineNumbers"; -static const char * const textWrappingKey = "TextWrapping"; -static const char * const showWrapColumnKey = "ShowWrapColumn"; -static const char * const wrapColumnKey = "WrapColumn"; -static const char * const visualizeWhitespaceKey = "VisualizeWhitespace"; -static const char * const displayFoldingMarkersKey = "DisplayFoldingMarkers"; -static const char * const highlightCurrentLineKey = "HighlightCurrentLine2Key"; -static const char * const highlightBlocksKey = "HighlightBlocksKey"; -static const char * const animateMatchingParenthesesKey= "AnimateMatchingParenthesesKey"; -static const char * const markTextChangesKey = "MarkTextChanges"; -static const char * const autoFoldFirstCommentKey = "AutoFoldFirstComment"; -static const char * const centerCursorOnScrollKey = "CenterCursorOnScroll"; -static const char * const groupPostfix = "DisplaySettings"; +static const char displayLineNumbersKey[] = "DisplayLineNumbers"; +static const char textWrappingKey[] = "TextWrapping"; +static const char showWrapColumnKey[] = "ShowWrapColumn"; +static const char wrapColumnKey[] = "WrapColumn"; +static const char visualizeWhitespaceKey[] = "VisualizeWhitespace"; +static const char displayFoldingMarkersKey[] = "DisplayFoldingMarkers"; +static const char highlightCurrentLineKey[] = "HighlightCurrentLine2Key"; +static const char highlightBlocksKey[] = "HighlightBlocksKey"; +static const char animateMatchingParenthesesKey[] = "AnimateMatchingParenthesesKey"; +static const char markTextChangesKey[] = "MarkTextChanges"; +static const char autoFoldFirstCommentKey[] = "AutoFoldFirstComment"; +static const char centerCursorOnScrollKey[] = "CenterCursorOnScroll"; +static const char groupPostfix[] = "DisplaySettings"; namespace TextEditor { diff --git a/src/plugins/texteditor/extraencodingsettings.cpp b/src/plugins/texteditor/extraencodingsettings.cpp index 2b70523b61..87c8e2b30d 100644 --- a/src/plugins/texteditor/extraencodingsettings.cpp +++ b/src/plugins/texteditor/extraencodingsettings.cpp @@ -38,8 +38,8 @@ #include // Keep this for compatibility reasons. -static const char * const kGroupPostfix = "EditorManager"; -static const char * const kUtf8BomBehaviorKey = "Utf8BomBehavior"; +static const char kGroupPostfix[] = "EditorManager"; +static const char kUtf8BomBehaviorKey[] = "Utf8BomBehavior"; using namespace TextEditor; diff --git a/src/plugins/texteditor/fontsettings.cpp b/src/plugins/texteditor/fontsettings.cpp index 206cffd2c7..8175777baf 100644 --- a/src/plugins/texteditor/fontsettings.cpp +++ b/src/plugins/texteditor/fontsettings.cpp @@ -44,11 +44,11 @@ #include #include -static const char *fontFamilyKey = "FontFamily"; -static const char *fontSizeKey = "FontSize"; -static const char *fontZoomKey= "FontZoom"; -static const char *antialiasKey = "FontAntialias"; -static const char *schemeFileNameKey = "ColorScheme"; +static const char fontFamilyKey[] = "FontFamily"; +static const char fontSizeKey[] = "FontSize"; +static const char fontZoomKey[] = "FontZoom"; +static const char antialiasKey[] = "FontAntialias"; +static const char schemeFileNameKey[] = "ColorScheme"; namespace { static const bool DEFAULT_ANTIALIAS = true; diff --git a/src/plugins/texteditor/tabsettings.cpp b/src/plugins/texteditor/tabsettings.cpp index 46b085673a..2cad99c630 100644 --- a/src/plugins/texteditor/tabsettings.cpp +++ b/src/plugins/texteditor/tabsettings.cpp @@ -40,17 +40,17 @@ #include #include -static const char *spacesForTabsKey = "SpacesForTabs"; -static const char *autoSpacesForTabsKey = "AutoSpacesForTabs"; -static const char *smartBackspaceKey = "SmartBackspace"; -static const char *autoIndentKey = "AutoIndent"; -static const char *tabSizeKey = "TabSize"; -static const char *indentSizeKey = "IndentSize"; -static const char *indentBracesKey = "IndentBraces"; -static const char *doubleIndentBlocksKey = "DoubleIndentBlocks"; -static const char *tabKeyBehaviorKey = "TabKeyBehavior"; -static const char *groupPostfix = "TabSettings"; -static const char *paddingModeKey = "PaddingMode"; +static const char spacesForTabsKey[] = "SpacesForTabs"; +static const char autoSpacesForTabsKey[] = "AutoSpacesForTabs"; +static const char smartBackspaceKey[] = "SmartBackspace"; +static const char autoIndentKey[] = "AutoIndent"; +static const char tabSizeKey[] = "TabSize"; +static const char indentSizeKey[] = "IndentSize"; +static const char indentBracesKey[] = "IndentBraces"; +static const char doubleIndentBlocksKey[] = "DoubleIndentBlocks"; +static const char tabKeyBehaviorKey[] = "TabKeyBehavior"; +static const char groupPostfix[] = "TabSettings"; +static const char paddingModeKey[] = "PaddingMode"; namespace TextEditor { diff --git a/src/plugins/texteditor/texteditorplugin.cpp b/src/plugins/texteditor/texteditorplugin.cpp index a0b5697fab..a3b9ef8cc1 100644 --- a/src/plugins/texteditor/texteditorplugin.cpp +++ b/src/plugins/texteditor/texteditorplugin.cpp @@ -68,12 +68,12 @@ using namespace TextEditor; using namespace TextEditor::Internal; -static const char * const kCurrentDocumentSelection = "CurrentDocument:Selection"; -static const char * const kCurrentDocumentRow = "CurrentDocument:Row"; -static const char * const kCurrentDocumentColumn = "CurrentDocument:Column"; -static const char * const kCurrentDocumentRowCount = "CurrentDocument:RowCount"; -static const char * const kCurrentDocumentColumnCount = "CurrentDocument:ColumnCount"; -static const char * const kCurrentDocumentFontSize = "CurrentDocument:FontSize"; +static const char kCurrentDocumentSelection[] = "CurrentDocument:Selection"; +static const char kCurrentDocumentRow[] = "CurrentDocument:Row"; +static const char kCurrentDocumentColumn[] = "CurrentDocument:Column"; +static const char kCurrentDocumentRowCount[] = "CurrentDocument:RowCount"; +static const char kCurrentDocumentColumnCount[] = "CurrentDocument:ColumnCount"; +static const char kCurrentDocumentFontSize[] = "CurrentDocument:FontSize"; TextEditorPlugin *TextEditorPlugin::m_instance = 0; diff --git a/src/plugins/vcsbase/vcsbaseeditor.h b/src/plugins/vcsbase/vcsbaseeditor.h index 477a24b6e3..4074503a6e 100644 --- a/src/plugins/vcsbase/vcsbaseeditor.h +++ b/src/plugins/vcsbase/vcsbaseeditor.h @@ -236,7 +236,7 @@ protected: QString findDiffFile(const QString &f, Core::IVersionControl *control = 0) const; virtual bool canRevertDiffChunk(const DiffChunk &dc) const; - // Revert a patch chunk. Default implemenation uses patch.exe + // Revert a patch chunk. Default implementation uses patch.exe virtual bool revertDiffChunk(const DiffChunk &dc) const; private: diff --git a/src/tools/qtcdebugger/main.cpp b/src/tools/qtcdebugger/main.cpp index 1d0b3937b9..41faac0a45 100644 --- a/src/tools/qtcdebugger/main.cpp +++ b/src/tools/qtcdebugger/main.cpp @@ -57,16 +57,16 @@ using namespace RegistryAccess; enum { debug = 0 }; -static const char *titleC = "Qt Creator Debugger"; -static const char *organizationC = "Nokia"; +static const char titleC[] = "Qt Creator Debugger"; +static const char organizationC[] = "Nokia"; // Optional -static const WCHAR *debuggerWow32RegistryKeyC = L"Software\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug"; +static const WCHAR debuggerWow32RegistryKeyC[] = L"Software\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug"; -static const WCHAR *debuggerRegistryDefaultValueNameC = L"Debugger.Default"; +static const WCHAR debuggerRegistryDefaultValueNameC[] = L"Debugger.Default"; -static const char *linkC = "http://msdn.microsoft.com/en-us/library/cc266343.aspx"; -static const char *creatorBinaryC = "qtcreator.exe"; +static const char linkC[] = "http://msdn.microsoft.com/en-us/library/cc266343.aspx"; +static const char creatorBinaryC[] = "qtcreator.exe"; #ifdef __GNUC__ #define RRF_RT_ANY 0x0000ffff // no type restriction