Commit f17d9f01 authored by hjk's avatar hjk Committed by Tobias Hunger

Use the canonical version of defining string literals

Change-Id: If36658de6f68f552f93830ba4f1cfa9994a2e44c
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 921f86df
...@@ -62,9 +62,9 @@ using namespace ExtensionSystem; ...@@ -62,9 +62,9 @@ using namespace ExtensionSystem;
enum { OptionIndent = 4, DescriptionIndent = 34 }; enum { OptionIndent = 4, DescriptionIndent = 34 };
static const char appNameC[] = "Qt Creator"; const char appNameC[] = "Qt Creator";
static const char corePluginNameC[] = "Core"; const char corePluginNameC[] = "Core";
static const char fixedOptionsC[] = const char fixedOptionsC[] =
" [OPTION]... [FILE]...\n" " [OPTION]... [FILE]...\n"
"Options:\n" "Options:\n"
" -help Display this help\n" " -help Display this help\n"
...@@ -75,17 +75,17 @@ static const char fixedOptionsC[] = ...@@ -75,17 +75,17 @@ static const char fixedOptionsC[] =
" -block Block until editor is closed\n" " -block Block until editor is closed\n"
" -pluginpath <path> Add a custom search path for plugins\n"; " -pluginpath <path> Add a custom search path for plugins\n";
static const char HELP_OPTION1[] = "-h"; const char HELP_OPTION1[] = "-h";
static const char HELP_OPTION2[] = "-help"; const char HELP_OPTION2[] = "-help";
static const char HELP_OPTION3[] = "/h"; const char HELP_OPTION3[] = "/h";
static const char HELP_OPTION4[] = "--help"; const char HELP_OPTION4[] = "--help";
static const char VERSION_OPTION[] = "-version"; const char VERSION_OPTION[] = "-version";
static const char CLIENT_OPTION[] = "-client"; const char CLIENT_OPTION[] = "-client";
static const char SETTINGS_OPTION[] = "-settingspath"; const char SETTINGS_OPTION[] = "-settingspath";
static const char TEST_OPTION[] = "-test"; const char TEST_OPTION[] = "-test";
static const char PID_OPTION[] = "-pid"; const char PID_OPTION[] = "-pid";
static const char BLOCK_OPTION[] = "-block"; const char BLOCK_OPTION[] = "-block";
static const char PLUGINPATH_OPTION[] = "-pluginpath"; const char PLUGINPATH_OPTION[] = "-pluginpath";
typedef QList<PluginSpec *> PluginSpecSet; typedef QList<PluginSpec *> PluginSpecSet;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
using namespace CPlusPlus; using namespace CPlusPlus;
static const char *token_names[] = { const char *token_names[] = {
(""), ("<error>"), (""), ("<error>"),
("<C++ comment>"), ("<C++ doxy comment>"), ("<C++ comment>"), ("<C++ doxy comment>"),
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
using namespace ExtensionSystem; using namespace ExtensionSystem;
using namespace ExtensionSystem::Internal; using namespace ExtensionSystem::Internal;
static const char END_OF_OPTIONS[] = "--"; const char END_OF_OPTIONS[] = "--";
const char *OptionsParser::NO_LOAD_OPTION = "-noload"; const char *OptionsParser::NO_LOAD_OPTION = "-noload";
const char *OptionsParser::LOAD_OPTION = "-load"; const char *OptionsParser::LOAD_OPTION = "-load";
const char *OptionsParser::TEST_OPTION = "-test"; const char *OptionsParser::TEST_OPTION = "-test";
......
...@@ -52,9 +52,9 @@ ...@@ -52,9 +52,9 @@
#include <QTest> #include <QTest>
#endif #endif
static const char C_IGNORED_PLUGINS[] = "Plugins/Ignored"; const char C_IGNORED_PLUGINS[] = "Plugins/Ignored";
static const char C_FORCEENABLED_PLUGINS[] = "Plugins/ForceEnabled"; const char C_FORCEENABLED_PLUGINS[] = "Plugins/ForceEnabled";
static const int DELAYED_INITIALIZE_INTERVAL = 20; // ms const int DELAYED_INITIALIZE_INTERVAL = 20; // ms
typedef QList<ExtensionSystem::PluginSpec *> PluginSpecSet; typedef QList<ExtensionSystem::PluginSpec *> PluginSpecSet;
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include "stringutils.h" #include "stringutils.h"
#include "gdbmihelpers.h" #include "gdbmihelpers.h"
static const char eventContextC[] = "event"; const char eventContextC[] = "event";
const static int winExceptionCppException = 0xe06d7363; const static int winExceptionCppException = 0xe06d7363;
......
...@@ -980,10 +980,10 @@ static inline void getDateFromJulianDay(unsigned julianDay, int *year, int *mont ...@@ -980,10 +980,10 @@ static inline void getDateFromJulianDay(unsigned julianDay, int *year, int *mont
*day = d; *day = d;
} }
const char *stdStringTypeC = "std::basic_string<char,std::char_traits<char>,std::allocator<char> >"; const char stdStringTypeC[] = "std::basic_string<char,std::char_traits<char>,std::allocator<char> >";
const char *stdWStringTypeC = "std::basic_string<unsigned short,std::char_traits<unsigned short>,std::allocator<unsigned short> >"; const char stdWStringTypeC[] = "std::basic_string<unsigned short,std::char_traits<unsigned short>,std::allocator<unsigned short> >";
// Compiler option: -Zc:wchar_t-: // Compiler option: -Zc:wchar_t-:
const char *stdWStringWCharTypeC = "std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >"; const char stdWStringWCharTypeC[] = "std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >";
static KnownType knownPODTypeHelper(const std::string &type, std::string::size_type endPos) static KnownType knownPODTypeHelper(const std::string &type, std::string::size_type endPos)
{ {
......
...@@ -38,10 +38,8 @@ using namespace CMakeProjectManager; ...@@ -38,10 +38,8 @@ using namespace CMakeProjectManager;
using namespace Internal; using namespace Internal;
using namespace ProjectExplorer; using namespace ProjectExplorer;
namespace { const char COMMON_ERROR_PATTERN[] = "^CMake Error at (.*):([0-9]*) \\((.*)\\):";
const char * const COMMON_ERROR_PATTERN = "^CMake Error at (.*):([0-9]*) \\((.*)\\):"; const char NEXT_SUBERROR_PATTERN[] = "^CMake Error in (.*):";
const char * const NEXT_SUBERROR_PATTERN = "^CMake Error in (.*):";
}
CMakeParser::CMakeParser() : CMakeParser::CMakeParser() :
m_skippedFirstEmptyLine(false) m_skippedFirstEmptyLine(false)
......
...@@ -60,8 +60,8 @@ IBuildStepFactory *findRestoreFactory(BuildStepList *parent, const QVariantMap & ...@@ -60,8 +60,8 @@ IBuildStepFactory *findRestoreFactory(BuildStepList *parent, const QVariantMap &
return 0; return 0;
} }
const char * const STEPS_COUNT_KEY("ProjectExplorer.BuildStepList.StepsCount"); const char STEPS_COUNT_KEY[] = "ProjectExplorer.BuildStepList.StepsCount";
const char * const STEPS_PREFIX("ProjectExplorer.BuildStepList.Step."); const char STEPS_PREFIX[] = "ProjectExplorer.BuildStepList.Step.";
} // namespace } // namespace
......
...@@ -39,12 +39,8 @@ ...@@ -39,12 +39,8 @@
using namespace ProjectExplorer; using namespace ProjectExplorer;
namespace { const char BUILD_STEP_LIST_COUNT[] = "ProjectExplorer.BuildConfiguration.BuildStepListCount";
const char BUILD_STEP_LIST_PREFIX[] = "ProjectExplorer.BuildConfiguration.BuildStepList.";
const char * const BUILD_STEP_LIST_COUNT("ProjectExplorer.BuildConfiguration.BuildStepListCount");
const char * const BUILD_STEP_LIST_PREFIX("ProjectExplorer.BuildConfiguration.BuildStepList.");
} // namespace
DeployConfiguration::DeployConfiguration(Target *target, const Core::Id id) : DeployConfiguration::DeployConfiguration(Target *target, const Core::Id id) :
ProjectConfiguration(target, id), ProjectConfiguration(target, id),
......
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
namespace QmlProjectManager { namespace QmlProjectManager {
namespace Constants { namespace Constants {
const char *const PROJECTCONTEXT = "QmlProject.ProjectContext"; const char PROJECTCONTEXT[] = "QmlProject.ProjectContext";
const char *const QMLPROJECT_MIMETYPE = QmlJSTools::Constants::QMLPROJECT_MIMETYPE; const char QMLPROJECT_MIMETYPE[] = QmlJSTools::Constants::QMLPROJECT_MIMETYPE;
} // namespace Constants } // namespace Constants
} // namespace QmlProjectManager } // namespace QmlProjectManager
......
...@@ -44,7 +44,7 @@ using namespace Qt4ProjectManager; ...@@ -44,7 +44,7 @@ using namespace Qt4ProjectManager;
using namespace Qt4ProjectManager::Internal; using namespace Qt4ProjectManager::Internal;
const char *qt_file_dialog_filter_reg_exp = const char qt_file_dialog_filter_reg_exp[] =
"^(.*)\\(([a-zA-Z0-9_.*? +;#\\-\\[\\]@\\{\\}/!<>\\$%&=^~:\\|]*)\\)$"; "^(.*)\\(([a-zA-Z0-9_.*? +;#\\-\\[\\]@\\{\\}/!<>\\$%&=^~:\\|]*)\\)$";
// taken from qfiledialog.cpp // taken from qfiledialog.cpp
......
Markdown is supported
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