Skip to content
GitLab
Menu
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
4e7f2f8d
Commit
4e7f2f8d
authored
May 14, 2009
by
Friedemann Kleint
Browse files
Fixed translation glitches.
parent
6195035b
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
View file @
4e7f2f8d
...
...
@@ -115,11 +115,11 @@ QProcess *CMakeManager::createXmlFile(const QStringList &arguments, const QStrin
cmake
->
setProcessChannelMode
(
QProcess
::
MergedChannels
);
#ifdef Q_OS_WIN
QString
generator
=
"-GCodeBlocks - MinGW Makefiles"
;
const
QString
generator
=
QLatin1String
(
"-GCodeBlocks - MinGW Makefiles"
)
;
#else // Q_OS_WIN
QString
generator
=
"-GCodeBlocks - Unix Makefiles"
;
const
QString
generator
=
QLatin1String
(
"-GCodeBlocks - Unix Makefiles"
)
;
#endif // Q_OS_WIN
QString
srcdir
=
buildDirectory
.
exists
(
"CMakeCache.txt"
)
?
QString
(
"."
)
:
sourceDirectory
;
const
QString
srcdir
=
buildDirectory
.
exists
(
QLatin1String
(
"CMakeCache.txt"
)
)
?
QString
(
QLatin1Char
(
'.'
)
)
:
sourceDirectory
;
qDebug
()
<<
cmakeExecutable
()
<<
srcdir
<<
arguments
<<
generator
;
cmake
->
start
(
cmakeExecutable
(),
QStringList
()
<<
srcdir
<<
arguments
<<
generator
);
return
cmake
;
...
...
@@ -132,8 +132,8 @@ QString CMakeManager::findCbpFile(const QDir &directory)
// so this method below could find the wrong cbp file, if the user changes the project()
// 2name
foreach
(
const
QString
&
cbpFile
,
directory
.
entryList
())
{
if
(
cbpFile
.
endsWith
(
".cbp"
))
return
directory
.
path
()
+
"/"
+
cbpFile
;
if
(
cbpFile
.
endsWith
(
QLatin1String
(
".cbp"
))
)
return
directory
.
path
()
+
QLatin1Char
(
'/'
)
+
cbpFile
;
}
return
QString
::
null
;
}
...
...
@@ -142,14 +142,14 @@ QString CMakeManager::findCbpFile(const QDir &directory)
QString
CMakeManager
::
qtVersionForQMake
(
const
QString
&
qmakePath
)
{
QProcess
qmake
;
qmake
.
start
(
qmakePath
,
QStringList
(
)
<<
"--version"
);
qmake
.
start
(
qmakePath
,
QStringList
(
QLatin1String
(
"--version"
)
))
;
if
(
!
qmake
.
waitForFinished
())
return
false
;
QString
output
=
qmake
.
readAllStandardOutput
();
QRegExp
regexp
(
"(QMake version|Qmake version:)[
\\
s]*([
\\
d.]*)"
);
QRegExp
regexp
(
QLatin1String
(
"(QMake version|Qmake version:)[
\\
s]*([
\\
d.]*)"
)
)
;
regexp
.
indexIn
(
output
);
if
(
regexp
.
cap
(
2
).
startsWith
(
"2."
))
{
QRegExp
regexp2
(
"Using Qt version[
\\
s]*([
\\
d
\\
.]*)"
);
if
(
regexp
.
cap
(
2
).
startsWith
(
QLatin1String
(
"2."
))
)
{
QRegExp
regexp2
(
QLatin1String
(
"Using Qt version[
\\
s]*([
\\
d
\\
.]*)"
)
)
;
regexp2
.
indexIn
(
output
);
return
regexp2
.
cap
(
1
);
}
...
...
@@ -176,17 +176,17 @@ void CMakeRunner::run(QFutureInterface<void> &fi)
QString
executable
=
m_executable
;
m_mutex
.
unlock
();
QProcess
cmake
;
cmake
.
start
(
executable
,
QStringList
(
)
<<
"--help"
);
cmake
.
start
(
executable
,
QStringList
(
QLatin1String
(
"--help"
)
))
;
cmake
.
waitForFinished
();
QString
response
=
cmake
.
readAll
();
QRegExp
versionRegexp
(
"^cmake version ([*
\\
d
\\
.]*)-(|patch (
\\
d*))(|
\\
r)
\\
n"
);
QRegExp
versionRegexp
(
QLatin1String
(
"^cmake version ([*
\\
d
\\
.]*)-(|patch (
\\
d*))(|
\\
r)
\\
n"
)
)
;
versionRegexp
.
indexIn
(
response
);
m_mutex
.
lock
();
m_supportsQtCreator
=
response
.
contains
(
"QtCreator"
);
m_supportsQtCreator
=
response
.
contains
(
QLatin1String
(
"QtCreator"
)
)
;
m_version
=
versionRegexp
.
cap
(
1
);
if
(
!
versionRegexp
.
capturedTexts
().
size
()
>
3
)
m_version
+=
"."
+
versionRegexp
.
cap
(
3
);
m_version
+=
QLatin1Char
(
'.'
)
+
versionRegexp
.
cap
(
3
);
m_cacheUpToDate
=
true
;
m_mutex
.
unlock
();
fi
.
reportFinished
();
...
...
@@ -243,15 +243,15 @@ CMakeSettingsPage::CMakeSettingsPage()
{
Core
::
ICore
*
core
=
Core
::
ICore
::
instance
();
QSettings
*
settings
=
core
->
settings
();
settings
->
beginGroup
(
"CMakeSettings"
);
m_cmakeRunner
.
setExecutable
(
settings
->
value
(
"cmakeExecutable"
).
toString
());
settings
->
beginGroup
(
QLatin1String
(
"CMakeSettings"
)
)
;
m_cmakeRunner
.
setExecutable
(
settings
->
value
(
QLatin1String
(
"cmakeExecutable"
)
)
.
toString
());
settings
->
endGroup
();
}
QString
CMakeSettingsPage
::
findCmakeExecutable
()
const
{
ProjectExplorer
::
Environment
env
=
ProjectExplorer
::
Environment
::
systemEnvironment
();
return
env
.
searchInPath
(
"cmake"
);
return
env
.
searchInPath
(
QLatin1String
(
"cmake"
)
)
;
}
QString
CMakeSettingsPage
::
id
()
const
...
...
@@ -280,7 +280,7 @@ QWidget *CMakeSettingsPage::createPage(QWidget *parent)
QFormLayout
*
fl
=
new
QFormLayout
(
w
);
m_pathchooser
=
new
Core
::
Utils
::
PathChooser
(
w
);
m_pathchooser
->
setExpectedKind
(
Core
::
Utils
::
PathChooser
::
Command
);
fl
->
addRow
(
"CMake executable"
,
m_pathchooser
);
fl
->
addRow
(
tr
(
"CMake executable"
)
,
m_pathchooser
);
m_pathchooser
->
setPath
(
cmakeExecutable
());
return
w
;
}
...
...
@@ -288,8 +288,8 @@ QWidget *CMakeSettingsPage::createPage(QWidget *parent)
void
CMakeSettingsPage
::
saveSettings
()
const
{
QSettings
*
settings
=
Core
::
ICore
::
instance
()
->
settings
();
settings
->
beginGroup
(
"CMakeSettings"
);
settings
->
setValue
(
"cmakeExecutable"
,
m_cmakeRunner
.
executable
());
settings
->
beginGroup
(
QLatin1String
(
"CMakeSettings"
)
)
;
settings
->
setValue
(
QLatin1String
(
"cmakeExecutable"
)
,
m_cmakeRunner
.
executable
());
settings
->
endGroup
();
}
...
...
src/plugins/coreplugin/dialogs/saveitemsdialog.ui
View file @
4e7f2f8d
...
...
@@ -59,7 +59,7 @@
<item>
<widget
class=
"QCheckBox"
name=
"saveBeforeBuildCheckBox"
>
<property
name=
"text"
>
<string>
Automatically save all
F
iles before building
</string>
<string>
Automatically save all
f
iles before building
</string>
</property>
</widget>
</item>
...
...
src/plugins/coreplugin/welcomemode.cpp
View file @
4e7f2f8d
...
...
@@ -96,6 +96,19 @@ QDebug operator<<(QDebug dgb, const WelcomeMode::WelcomePageData &d)
return
dgb
;
}
// Format a title + ruler for projects/session labels
static
inline
QString
devTitleLabel
(
const
QString
&
text
)
{
QString
rc
=
QLatin1String
(
"<html><head><style type=
\"
text/css
\"
>p, li { white-space: pre-wrap; }</style></head>"
"<body style=
\"
font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;
\"
>"
"<p style=
\"
margin-top:16px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
\"
>"
"<span style=
\"
font-size:x-large; color:#555555;
\"
>"
);
rc
+=
text
;
rc
+=
QLatin1String
(
"</span></p><hr/></body></html>"
);
return
rc
;
}
// --- WelcomeMode
WelcomeMode
::
WelcomeMode
()
:
m_d
(
new
WelcomeModePrivate
)
...
...
@@ -108,6 +121,8 @@ WelcomeMode::WelcomeMode() :
m_d
->
rssFetcher
=
new
RSSFetcher
(
8
,
this
);
m_d
->
m_welcomePage
=
new
QWidget
(
m_d
->
m_widget
);
m_d
->
ui
.
setupUi
(
m_d
->
m_welcomePage
);
m_d
->
ui
.
projTitleLabel
->
setText
(
devTitleLabel
(
tr
(
"Projects"
)));
m_d
->
ui
.
titleLabel
->
setText
(
devTitleLabel
(
tr
(
"Sessions"
)));
m_d
->
ui
.
sessTreeWidget
->
viewport
()
->
setAutoFillBackground
(
false
);
m_d
->
ui
.
projTreeWidget
->
viewport
()
->
setAutoFillBackground
(
false
);
m_d
->
ui
.
newsTreeWidget
->
viewport
()
->
setAutoFillBackground
(
false
);
...
...
src/plugins/coreplugin/welcomemode.ui
View file @
4e7f2f8d
...
...
@@ -475,14 +475,6 @@ p, li { white-space: pre-wrap; }
<layout
class=
"QGridLayout"
name=
"gridLayout_3"
>
<item
row=
"0"
column=
"0"
colspan=
"2"
>
<widget
class=
"QLabel"
name=
"titleLabel"
>
<property
name=
"text"
>
<string
notr=
"true"
>
<
!DOCTYPE HTML PUBLIC
"
-//W3C//DTD HTML 4.0//EN
"
"
http://www.w3.org/TR/REC-html40/strict.dtd
">
<
html
><
head
><
meta name=
"
qrichtext
"
content=
"
1
"
/
><
style type=
"
text/css
">
p, li { white-space: pre-wrap; }
<
/style
><
/head
><
body style=
"
font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;
">
<
p style=
"
margin-top:16px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
"><
span style=
"
font-size:x-large; color:#555555;
">
Sessions
<
/span
><
/p
>
<
hr /
><
/body
><
/html
>
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
</set>
</property>
...
...
@@ -597,14 +589,6 @@ p, li { white-space: pre-wrap; }
<layout
class=
"QGridLayout"
name=
"gridLayout_5"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"projTitleLabel"
>
<property
name=
"text"
>
<string
notr=
"true"
>
<
!DOCTYPE HTML PUBLIC
"
-//W3C//DTD HTML 4.0//EN
"
"
http://www.w3.org/TR/REC-html40/strict.dtd
">
<
html
><
head
><
meta name=
"
qrichtext
"
content=
"
1
"
/
><
style type=
"
text/css
">
p, li { white-space: pre-wrap; }
<
/style
><
/head
><
body style=
"
font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;
">
<
p style=
"
margin-top:16px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
"><
span style=
"
font-size:x-large; color:#555555;
">
Projects
<
/span
><
/p
>
<
hr /
><
/body
><
/html
>
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
</set>
</property>
...
...
src/plugins/fakevim/fakevimhandler.cpp
View file @
4e7f2f8d
...
...
@@ -1726,7 +1726,7 @@ void FakeVimHandler::Private::handleCommand(const QString &cmd)
void
FakeVimHandler
::
Private
::
handleExCommand
(
const
QString
&
cmd0
)
{
QString
cmd
=
cmd0
;
if
(
cmd
.
startsWith
(
"%"
))
if
(
cmd
.
startsWith
(
QLatin1Char
(
'%'
)
))
cmd
=
"1,$"
+
cmd
.
mid
(
1
);
int
beginLine
=
-
1
;
...
...
@@ -1822,7 +1822,7 @@ void FakeVimHandler::Private::handleExCommand(const QString &cmd0)
enterCommandMode
();
showBlackMessage
(
tr
(
"
\"
%1
\"
%2L, %3C"
)
.
arg
(
m_currentFileName
).
arg
(
data
.
count
(
'\n'
)).
arg
(
data
.
size
()));
}
else
if
(
cmd
.
startsWith
(
"!"
))
{
}
else
if
(
cmd
.
startsWith
(
QLatin1Char
(
'!'
)
))
{
selectRange
(
beginLine
,
endLine
);
QString
command
=
cmd
.
mid
(
1
).
trimmed
();
QString
text
=
removeSelectedText
();
...
...
@@ -1838,15 +1838,14 @@ void FakeVimHandler::Private::handleExCommand(const QString &cmd0)
setPosition
(
firstPositionInLine
(
beginLine
));
enterCommandMode
();
//qDebug() << "FILTER: " << command;
showBlackMessage
(
tr
(
"%
1
lines filtered"
).
arg
(
text
.
count
(
'\n'
)));
}
else
if
(
cmd
.
startsWith
(
">"
))
{
showBlackMessage
(
tr
(
"%
n
lines filtered"
,
0
,
text
.
count
(
'\n'
)));
}
else
if
(
cmd
.
startsWith
(
QLatin1Char
(
'>'
)
))
{
m_anchor
=
firstPositionInLine
(
beginLine
);
setPosition
(
firstPositionInLine
(
endLine
));
shiftRegionRight
(
1
);
leaveVisualMode
();
enterCommandMode
();
showBlackMessage
(
tr
(
"%1 lines >ed %2 time"
)
.
arg
(
endLine
-
beginLine
+
1
).
arg
(
1
));
showBlackMessage
(
tr
(
"%n lines >ed %1 time"
,
0
,
(
endLine
-
beginLine
+
1
)).
arg
(
1
));
}
else
if
(
cmd
==
"red"
||
cmd
==
"redo"
)
{
// :redo
redo
();
enterCommandMode
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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