Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
70cf2c76
Commit
70cf2c76
authored
Mar 18, 2009
by
Friedemann Kleint
Browse files
Fixes: Use common default for lower casing file names
parent
bccf4a1f
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/libs/utils/classnamevalidatinglineedit.cpp
View file @
70cf2c76
...
...
@@ -51,7 +51,7 @@ ClassNameValidatingLineEditPrivate:: ClassNameValidatingLineEditPrivate() :
m_nameRegexp
(
QLatin1String
(
"[a-zA-Z_][a-zA-Z0-9_]*(::[a-zA-Z_][a-zA-Z0-9_]*)*"
)),
m_namespaceDelimiter
(
QLatin1String
(
"::"
)),
m_namespacesEnabled
(
false
),
m_lowerCaseFileName
(
fals
e
)
m_lowerCaseFileName
(
tru
e
)
{
QTC_ASSERT
(
m_nameRegexp
.
isValid
(),
return
);
}
...
...
src/plugins/cppeditor/cppclasswizard.cpp
View file @
70cf2c76
...
...
@@ -94,10 +94,11 @@ ClassNamePage::ClassNamePage(QWidget *parent) :
// Retrieve settings of CppTools plugin.
static
inline
bool
lowerCaseFiles
(
const
Core
::
ICore
*
core
)
{
QString
camelCaseSettingsKey
=
QLatin1String
(
CppTools
::
Constants
::
CPPTOOLS_SETTINGSGROUP
);
camelCaseSettingsKey
+=
QLatin1Char
(
'/'
);
camelCaseSettingsKey
+=
QLatin1String
(
CppTools
::
Constants
::
LOWERCASE_CPPFILES_KEY
);
return
core
->
settings
()
->
value
(
camelCaseSettingsKey
,
QVariant
(
false
)).
toBool
();
QString
lowerCaseSettingsKey
=
QLatin1String
(
CppTools
::
Constants
::
CPPTOOLS_SETTINGSGROUP
);
lowerCaseSettingsKey
+=
QLatin1Char
(
'/'
);
lowerCaseSettingsKey
+=
QLatin1String
(
CppTools
::
Constants
::
LOWERCASE_CPPFILES_KEY
);
const
bool
lowerCaseDefault
=
CppTools
::
Constants
::
lowerCaseFilesDefault
;
return
core
->
settings
()
->
value
(
lowerCaseSettingsKey
,
QVariant
(
lowerCaseDefault
)).
toBool
();
}
// Set up new class widget from settings
...
...
src/plugins/cpptools/cppfilesettingspage.cpp
View file @
70cf2c76
...
...
@@ -64,7 +64,8 @@ void CppFileSettings::fromSettings(QSettings *s)
s
->
beginGroup
(
QLatin1String
(
Constants
::
CPPTOOLS_SETTINGSGROUP
));
headerSuffix
=
s
->
value
(
QLatin1String
(
headerSuffixKeyC
),
QLatin1String
(
"h"
)).
toString
();
sourceSuffix
=
s
->
value
(
QLatin1String
(
sourceSuffixKeyC
),
QLatin1String
(
"cpp"
)).
toString
();
lowerCaseFiles
=
s
->
value
(
QLatin1String
(
Constants
::
LOWERCASE_CPPFILES_KEY
),
QVariant
(
true
)).
toBool
();
const
bool
lowerCaseDefault
=
Constants
::
lowerCaseFilesDefault
;
lowerCaseFiles
=
s
->
value
(
QLatin1String
(
Constants
::
LOWERCASE_CPPFILES_KEY
),
QVariant
(
lowerCaseDefault
)).
toBool
();
s
->
endGroup
();
}
...
...
src/plugins/cpptools/cpptoolsconstants.h
View file @
70cf2c76
...
...
@@ -46,6 +46,7 @@ const char * const CPP_HEADER_MIMETYPE = "text/x-c++hdr";
// QSettings keys for use by the "New Class" wizards.
const
char
*
const
CPPTOOLS_SETTINGSGROUP
=
"CppTools"
;
const
char
*
const
LOWERCASE_CPPFILES_KEY
=
"LowerCaseFiles"
;
enum
{
lowerCaseFilesDefault
=
1
};
const
char
*
const
CPP_SETTINGS_ID
=
QT_TRANSLATE_NOOP
(
"CppTools"
,
"File naming conventions"
);
const
char
*
const
CPP_SETTINGS_CATEGORY
=
QT_TRANSLATE_NOOP
(
"CppTools"
,
"C++"
);
...
...
src/plugins/designer/cpp/formclasswizard.cpp
View file @
70cf2c76
...
...
@@ -67,10 +67,11 @@ QString FormClassWizard::formSuffix() const
// Retrieve settings of CppTools plugin.
static
inline
bool
lowerCaseFiles
()
{
QString
camelCaseSettingsKey
=
QLatin1String
(
CppTools
::
Constants
::
CPPTOOLS_SETTINGSGROUP
);
camelCaseSettingsKey
+=
QLatin1Char
(
'/'
);
camelCaseSettingsKey
+=
QLatin1String
(
CppTools
::
Constants
::
LOWERCASE_CPPFILES_KEY
);
return
Core
::
ICore
::
instance
()
->
settings
()
->
value
(
camelCaseSettingsKey
,
QVariant
(
false
)).
toBool
();
QString
lowerCaseSettingsKey
=
QLatin1String
(
CppTools
::
Constants
::
CPPTOOLS_SETTINGSGROUP
);
lowerCaseSettingsKey
+=
QLatin1Char
(
'/'
);
lowerCaseSettingsKey
+=
QLatin1String
(
CppTools
::
Constants
::
LOWERCASE_CPPFILES_KEY
);
const
bool
lowerCaseDefault
=
CppTools
::
Constants
::
lowerCaseFilesDefault
;
return
Core
::
ICore
::
instance
()
->
settings
()
->
value
(
lowerCaseSettingsKey
,
QVariant
(
lowerCaseDefault
)).
toBool
();
}
QWizard
*
FormClassWizard
::
createWizardDialog
(
QWidget
*
parent
,
...
...
src/plugins/designer/cpp/formclasswizardpage.cpp
View file @
70cf2c76
...
...
@@ -84,6 +84,7 @@ static inline bool lowerCaseFiles(const Core::ICore *core)
QString
camelCaseSettingsKey
=
QLatin1String
(
CppTools
::
Constants
::
CPPTOOLS_SETTINGSGROUP
);
camelCaseSettingsKey
+=
QLatin1Char
(
'/'
);
camelCaseSettingsKey
+=
QLatin1String
(
CppTools
::
Constants
::
LOWERCASE_CPPFILES_KEY
);
return
core
->
settings
()
->
value
(
camelCaseSettingsKey
,
QVariant
(
false
)).
toBool
();
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment