Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Tobias Hunger
qt-creator
Commits
342caa21
Commit
342caa21
authored
Dec 09, 2008
by
hjk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some more whitespace changes
parent
88b7a14a
Changes
90
Hide whitespace changes
Inline
Side-by-side
Showing
90 changed files
with
528 additions
and
571 deletions
+528
-571
shared/cpaster/cgi.cpp
shared/cpaster/cgi.cpp
+7
-7
shared/cpaster/splitter.cpp
shared/cpaster/splitter.cpp
+1
-3
shared/cpaster/view.cpp
shared/cpaster/view.cpp
+2
-2
shared/help/helpviewer.cpp
shared/help/helpviewer.cpp
+1
-1
shared/indenter/test/main.cpp
shared/indenter/test/main.cpp
+1
-1
shared/proparser/proeditor.cpp
shared/proparser/proeditor.cpp
+3
-6
shared/proparser/proeditormodel.cpp
shared/proparser/proeditormodel.cpp
+10
-11
shared/proparser/profileevaluator.cpp
shared/proparser/profileevaluator.cpp
+6
-6
shared/proparser/proparserutils.h
shared/proparser/proparserutils.h
+20
-20
shared/proparser/prowriter.cpp
shared/proparser/prowriter.cpp
+3
-3
shared/proparser/proxml.cpp
shared/proparser/proxml.cpp
+1
-1
shared/proparser/valueeditor.cpp
shared/proparser/valueeditor.cpp
+1
-1
shared/qrceditor/resourcefile.cpp
shared/qrceditor/resourcefile.cpp
+10
-10
shared/qrceditor/resourceview.cpp
shared/qrceditor/resourceview.cpp
+9
-10
shared/qtsingleapplication/qtlocalpeer.cpp
shared/qtsingleapplication/qtlocalpeer.cpp
+3
-7
src/libs/extensionsystem/pluginmanager.cpp
src/libs/extensionsystem/pluginmanager.cpp
+2
-2
src/libs/utils/filewizardpage.cpp
src/libs/utils/filewizardpage.cpp
+1
-1
src/libs/utils/projectintropage.cpp
src/libs/utils/projectintropage.cpp
+1
-1
src/libs/utils/submiteditorwidget.cpp
src/libs/utils/submiteditorwidget.cpp
+3
-2
src/plugins/bineditor/bineditor.cpp
src/plugins/bineditor/bineditor.cpp
+2
-2
src/plugins/bookmarks/bookmarkmanager.cpp
src/plugins/bookmarks/bookmarkmanager.cpp
+1
-1
src/plugins/cmakeprojectmanager/cmakeproject.cpp
src/plugins/cmakeprojectmanager/cmakeproject.cpp
+15
-17
src/plugins/coreplugin/basefilewizard.cpp
src/plugins/coreplugin/basefilewizard.cpp
+2
-2
src/plugins/coreplugin/dialogs/settingsdialog.cpp
src/plugins/coreplugin/dialogs/settingsdialog.cpp
+4
-4
src/plugins/coreplugin/dialogs/shortcutsettings.cpp
src/plugins/coreplugin/dialogs/shortcutsettings.cpp
+4
-4
src/plugins/coreplugin/editormanager/editormanager.cpp
src/plugins/coreplugin/editormanager/editormanager.cpp
+1
-1
src/plugins/coreplugin/editormanager/openeditorsview.cpp
src/plugins/coreplugin/editormanager/openeditorsview.cpp
+1
-1
src/plugins/coreplugin/fileiconprovider.cpp
src/plugins/coreplugin/fileiconprovider.cpp
+2
-2
src/plugins/coreplugin/mainwindow.cpp
src/plugins/coreplugin/mainwindow.cpp
+4
-3
src/plugins/coreplugin/manhattanstyle.cpp
src/plugins/coreplugin/manhattanstyle.cpp
+1
-1
src/plugins/coreplugin/mimedatabase.cpp
src/plugins/coreplugin/mimedatabase.cpp
+1
-1
src/plugins/coreplugin/navigationwidget.cpp
src/plugins/coreplugin/navigationwidget.cpp
+2
-2
src/plugins/coreplugin/outputpane.cpp
src/plugins/coreplugin/outputpane.cpp
+2
-2
src/plugins/coreplugin/progressmanager/progresspie.cpp
src/plugins/coreplugin/progressmanager/progresspie.cpp
+2
-2
src/plugins/coreplugin/rightpane.cpp
src/plugins/coreplugin/rightpane.cpp
+3
-3
src/plugins/coreplugin/styleanimator.cpp
src/plugins/coreplugin/styleanimator.cpp
+3
-2
src/plugins/coreplugin/vcsmanager.cpp
src/plugins/coreplugin/vcsmanager.cpp
+4
-4
src/plugins/debugger/attachexternaldialog.cpp
src/plugins/debugger/attachexternaldialog.cpp
+38
-39
src/plugins/debugger/attachremotedialog.cpp
src/plugins/debugger/attachremotedialog.cpp
+14
-14
src/plugins/debugger/gdbtypemacros.cpp
src/plugins/debugger/gdbtypemacros.cpp
+3
-3
src/plugins/debugger/startexternaldialog.cpp
src/plugins/debugger/startexternaldialog.cpp
+1
-1
src/plugins/designer/cpp/formclasswizardparameters.cpp
src/plugins/designer/cpp/formclasswizardparameters.cpp
+1
-1
src/plugins/designer/formeditorw.cpp
src/plugins/designer/formeditorw.cpp
+1
-1
src/plugins/find/basetextfind.cpp
src/plugins/find/basetextfind.cpp
+1
-1
src/plugins/git/gitplugin.cpp
src/plugins/git/gitplugin.cpp
+1
-1
src/plugins/help/contentstoolwindow.cpp
src/plugins/help/contentstoolwindow.cpp
+6
-7
src/plugins/help/helpengine.cpp
src/plugins/help/helpengine.cpp
+10
-10
src/plugins/help/helpplugin.cpp
src/plugins/help/helpplugin.cpp
+1
-1
src/plugins/perforce/perforceplugin.cpp
src/plugins/perforce/perforceplugin.cpp
+3
-4
src/plugins/projectexplorer/abstractprocessstep.cpp
src/plugins/projectexplorer/abstractprocessstep.cpp
+8
-11
src/plugins/projectexplorer/buildconfiguration.cpp
src/plugins/projectexplorer/buildconfiguration.cpp
+4
-5
src/plugins/projectexplorer/buildsettingspropertiespage.cpp
src/plugins/projectexplorer/buildsettingspropertiespage.cpp
+10
-14
src/plugins/projectexplorer/buildstep.cpp
src/plugins/projectexplorer/buildstep.cpp
+4
-4
src/plugins/projectexplorer/buildstepspage.cpp
src/plugins/projectexplorer/buildstepspage.cpp
+15
-15
src/plugins/projectexplorer/environment.cpp
src/plugins/projectexplorer/environment.cpp
+15
-16
src/plugins/projectexplorer/environmenteditmodel.cpp
src/plugins/projectexplorer/environmenteditmodel.cpp
+53
-53
src/plugins/projectexplorer/outputwindow.cpp
src/plugins/projectexplorer/outputwindow.cpp
+2
-2
src/plugins/projectexplorer/persistentsettings.cpp
src/plugins/projectexplorer/persistentsettings.cpp
+1
-1
src/plugins/projectexplorer/pluginfilefactory.cpp
src/plugins/projectexplorer/pluginfilefactory.cpp
+1
-1
src/plugins/projectexplorer/processstep.cpp
src/plugins/projectexplorer/processstep.cpp
+4
-4
src/plugins/projectexplorer/project.cpp
src/plugins/projectexplorer/project.cpp
+39
-49
src/plugins/projectexplorer/projectexplorer.cpp
src/plugins/projectexplorer/projectexplorer.cpp
+3
-3
src/plugins/projectexplorer/projectmodels.cpp
src/plugins/projectexplorer/projectmodels.cpp
+13
-15
src/plugins/projectexplorer/projectwindow.cpp
src/plugins/projectexplorer/projectwindow.cpp
+3
-6
src/plugins/projectexplorer/projectwizardpage.cpp
src/plugins/projectexplorer/projectwizardpage.cpp
+3
-2
src/plugins/projectexplorer/removefiledialog.cpp
src/plugins/projectexplorer/removefiledialog.cpp
+1
-1
src/plugins/projectexplorer/session.cpp
src/plugins/projectexplorer/session.cpp
+6
-6
src/plugins/projectexplorer/sessiondialog.cpp
src/plugins/projectexplorer/sessiondialog.cpp
+1
-1
src/plugins/projectexplorer/taskwindow.cpp
src/plugins/projectexplorer/taskwindow.cpp
+2
-2
src/plugins/qt4projectmanager/cesdkhandler.cpp
src/plugins/qt4projectmanager/cesdkhandler.cpp
+11
-11
src/plugins/qt4projectmanager/deployhelper.cpp
src/plugins/qt4projectmanager/deployhelper.cpp
+2
-2
src/plugins/qt4projectmanager/gdbmacrosbuildstep.cpp
src/plugins/qt4projectmanager/gdbmacrosbuildstep.cpp
+2
-2
src/plugins/qt4projectmanager/makestep.cpp
src/plugins/qt4projectmanager/makestep.cpp
+5
-5
src/plugins/qt4projectmanager/msvcenvironment.cpp
src/plugins/qt4projectmanager/msvcenvironment.cpp
+8
-8
src/plugins/qt4projectmanager/profilereader.cpp
src/plugins/qt4projectmanager/profilereader.cpp
+1
-1
src/plugins/qt4projectmanager/qmakestep.cpp
src/plugins/qt4projectmanager/qmakestep.cpp
+2
-2
src/plugins/qt4projectmanager/qt4buildconfigwidget.cpp
src/plugins/qt4projectmanager/qt4buildconfigwidget.cpp
+10
-10
src/plugins/qt4projectmanager/qt4buildenvironmentwidget.cpp
src/plugins/qt4projectmanager/qt4buildenvironmentwidget.cpp
+4
-4
src/plugins/qt4projectmanager/qt4nodes.cpp
src/plugins/qt4projectmanager/qt4nodes.cpp
+2
-2
src/plugins/qt4projectmanager/qt4project.cpp
src/plugins/qt4projectmanager/qt4project.cpp
+7
-7
src/plugins/qt4projectmanager/qt4projectmanager.cpp
src/plugins/qt4projectmanager/qt4projectmanager.cpp
+1
-2
src/plugins/qt4projectmanager/qt4runconfiguration.cpp
src/plugins/qt4projectmanager/qt4runconfiguration.cpp
+2
-2
src/plugins/qt4projectmanager/qtversionmanager.cpp
src/plugins/qt4projectmanager/qtversionmanager.cpp
+51
-51
src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
...plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
+1
-1
src/plugins/qtscripteditor/qtscripteditor.cpp
src/plugins/qtscripteditor/qtscripteditor.cpp
+1
-3
src/plugins/snippets/snippetswindow.cpp
src/plugins/snippets/snippetswindow.cpp
+1
-1
src/plugins/subversion/subversionplugin.cpp
src/plugins/subversion/subversionplugin.cpp
+3
-4
src/plugins/texteditor/basetextmark.cpp
src/plugins/texteditor/basetextmark.cpp
+2
-4
src/plugins/texteditor/codecselector.cpp
src/plugins/texteditor/codecselector.cpp
+4
-5
tests/auto/profilereader/sync
tests/auto/profilereader/sync
+1
-1
No files found.
shared/cpaster/cgi.cpp
View file @
342caa21
...
...
@@ -45,7 +45,7 @@ QString CGI::encodeURL(const QString &rawText)
enc
.
reserve
(
utf
.
length
());
// Make sure we at least have space for a normal US-ASCII URL
QByteArray
::
const_iterator
it
=
utf
.
constBegin
();
while
(
it
!=
utf
.
constEnd
())
{
while
(
it
!=
utf
.
constEnd
())
{
char
ch
=
*
it
;
if
((
'A'
<=
ch
&&
ch
<=
'Z'
)
||
(
'a'
<=
ch
&&
ch
<=
'z'
)
...
...
@@ -54,7 +54,7 @@ QString CGI::encodeURL(const QString &rawText)
else
if
(
ch
==
' '
)
enc
.
append
(
'+'
);
else
{
switch
(
ch
)
{
switch
(
ch
)
{
case
'-'
:
case
'_'
:
case
'('
:
case
')'
:
case
'.'
:
case
'!'
:
...
...
@@ -80,15 +80,15 @@ QString CGI::decodeURL(const QString &urlText)
{
QByteArray
dec
;
QString
::
const_iterator
it
=
urlText
.
constBegin
();
while
(
it
!=
urlText
.
constEnd
())
{
while
(
it
!=
urlText
.
constEnd
())
{
ushort
ch
=
(
*
it
).
unicode
();
switch
(
ch
)
{
switch
(
ch
)
{
case
'%'
:
{
char
c1
=
char
(
0x00ff
&
(
*
(
++
it
)).
unicode
());
char
c2
=
char
(
0x00ff
&
(
*
(
++
it
)).
unicode
());
ushort
v
=
0
;
if
(
'A'
<=
c1
&&
c1
<=
'Z'
)
if
(
'A'
<=
c1
&&
c1
<=
'Z'
)
v
=
c1
-
'A'
+
10
;
else
if
(
'a'
<=
c1
&&
c1
<=
'z'
)
v
=
c1
-
'a'
+
10
;
...
...
@@ -97,7 +97,7 @@ QString CGI::decodeURL(const QString &urlText)
else
continue
;
// Malformed URL!
v
<<=
4
;
// c1 was MSB half
if
(
'A'
<=
c2
&&
c2
<=
'Z'
)
if
(
'A'
<=
c2
&&
c2
<=
'Z'
)
v
|=
c2
-
'A'
+
10
;
else
if
(
'a'
<=
c2
&&
c2
<=
'z'
)
v
|=
c2
-
'a'
+
10
;
...
...
@@ -123,7 +123,7 @@ QString CGI::decodeURL(const QString &urlText)
// -------------------------------------------------------------------------------------------------
inline
const
char
*
unicodeToHTML
(
ushort
unicode_char
)
{
switch
(
unicode_char
)
{
switch
(
unicode_char
)
{
// Latin -------------------------------
case
0x0022
:
return
"quot"
;
// (34 ) quotation mark = APL quote
case
0x0026
:
return
"amp"
;
// (38 ) ampersand
...
...
shared/cpaster/splitter.cpp
View file @
342caa21
...
...
@@ -66,10 +66,8 @@ FileDataList splitDiffToFiles(const QByteArray &data)
// The algorithm works like this:
// On the first match we only get the filename of the first patch part
// On the second match (if any) we get the diff content, and the name of the next file patch
//
while
(
-
1
!=
(
splitIndex
=
splitExpr
.
indexIn
(
strData
,
splitIndex
)))
{
while
(
-
1
!=
(
splitIndex
=
splitExpr
.
indexIn
(
strData
,
splitIndex
)))
{
if
(
!
filename
.
isEmpty
())
{
QString
content
=
strData
.
mid
(
previousSplit
,
splitIndex
-
previousSplit
);
ret
.
append
(
FileData
(
filename
,
content
.
toLatin1
()));
...
...
shared/cpaster/view.cpp
View file @
342caa21
...
...
@@ -125,7 +125,7 @@ QString View::getComment()
QByteArray
View
::
getContent
()
{
QByteArray
newContent
;
for
(
int
i
=
0
;
i
<
m_ui
.
uiPatchList
->
count
();
++
i
)
{
for
(
int
i
=
0
;
i
<
m_ui
.
uiPatchList
->
count
();
++
i
)
{
QListWidgetItem
*
item
=
m_ui
.
uiPatchList
->
item
(
i
);
if
(
item
->
checkState
()
!=
Qt
::
Unchecked
)
newContent
+=
m_parts
.
at
(
i
).
content
;
...
...
@@ -159,7 +159,7 @@ int View::show(const QString &user, const QString &description, const QString &c
QByteArray
content
;
m_parts
=
parts
;
m_ui
.
uiPatchList
->
clear
();
foreach
(
const
FileData
part
,
parts
)
{
foreach
(
const
FileData
part
,
parts
)
{
QListWidgetItem
*
itm
=
new
QListWidgetItem
(
part
.
filename
,
m_ui
.
uiPatchList
);
itm
->
setCheckState
(
Qt
::
Checked
);
itm
->
setFlags
(
Qt
::
ItemIsSelectable
|
Qt
::
ItemIsUserCheckable
|
Qt
::
ItemIsEnabled
);
...
...
shared/help/helpviewer.cpp
View file @
342caa21
...
...
@@ -409,7 +409,7 @@ QVariant HelpViewer::loadResource(int type, const QUrl &name)
void
HelpViewer
::
openLinkInNewTab
()
{
if
(
lastAnchor
.
isEmpty
())
if
(
lastAnchor
.
isEmpty
())
return
;
parentWidget
->
setSourceInNewTab
(
QUrl
(
lastAnchor
));
...
...
shared/indenter/test/main.cpp
View file @
342caa21
...
...
@@ -174,7 +174,7 @@ int main(int argc, char **argv)
return
1
;
}
foreach
(
QString
fileName
,
fileNames
)
foreach
(
const
QString
&
fileName
,
fileNames
)
if
(
const
int
rc
=
format
(
fileName
))
return
rc
;
...
...
shared/proparser/proeditor.cpp
View file @
342caa21
...
...
@@ -139,7 +139,7 @@ bool ProEditor::eventFilter(QObject *, QEvent *event)
if
(
event
->
type
()
==
QEvent
::
ShortcutOverride
)
{
QKeyEvent
*
k
=
static_cast
<
QKeyEvent
*>
(
event
);
if
(
k
->
modifiers
()
==
Qt
::
ControlModifier
)
{
switch
(
k
->
key
())
{
switch
(
k
->
key
())
{
case
Qt
::
Key_X
:
cut
();
return
true
;
case
Qt
::
Key_C
:
...
...
@@ -168,11 +168,8 @@ void ProEditor::updatePasteAction()
bool
pasteEnabled
=
false
;
const
QMimeData
*
data
=
QApplication
::
clipboard
()
->
mimeData
();
if
(
data
)
{
if
(
data
->
hasFormat
(
QLatin1String
(
"application/x-problock"
)))
{
pasteEnabled
=
true
;
}
}
if
(
data
&&
data
->
hasFormat
(
QLatin1String
(
"application/x-problock"
)))
pasteEnabled
=
true
;
m_pasteAction
->
setEnabled
(
pasteEnabled
);
}
...
...
shared/proparser/proeditormodel.cpp
View file @
342caa21
...
...
@@ -732,13 +732,10 @@ bool ProEditorModel::insertItem(ProItem *item, int row, const QModelIndex &paren
void
ProEditorModel
::
markProFileModified
(
QModelIndex
index
)
{
while
(
index
.
isValid
())
{
if
(
proItem
(
index
)
->
kind
()
==
ProItem
::
BlockKind
)
{
while
(
index
.
isValid
())
{
if
(
proItem
(
index
)
->
kind
()
==
ProItem
::
BlockKind
)
{
ProBlock
*
block
=
proBlock
(
index
);
if
(
block
->
blockKind
()
==
ProBlock
::
ProFileKind
)
{
if
(
block
->
blockKind
()
==
ProBlock
::
ProFileKind
)
{
ProFile
*
file
=
static_cast
<
ProFile
*>
(
block
);
file
->
setModified
(
true
);
return
;
...
...
@@ -791,9 +788,9 @@ QString ProEditorModel::expressionToString(ProBlock *block, bool display) const
{
QString
result
;
QList
<
ProItem
*>
items
=
block
->
items
();
for
(
int
i
=
0
;
i
<
items
.
count
();
++
i
)
{
for
(
int
i
=
0
;
i
<
items
.
count
();
++
i
)
{
ProItem
*
item
=
items
.
at
(
i
);
switch
(
item
->
kind
())
{
switch
(
item
->
kind
())
{
case
ProItem
::
FunctionKind
:
{
ProFunction
*
v
=
static_cast
<
ProFunction
*>
(
item
);
result
+=
v
->
text
();
...
...
@@ -808,14 +805,16 @@ QString ProEditorModel::expressionToString(ProBlock *block, bool display) const
}
else
{
result
+=
v
->
text
();
}
break
;
}
break
;
}
case
ProItem
::
OperatorKind
:
{
ProOperator
*
v
=
static_cast
<
ProOperator
*>
(
item
);
if
(
v
->
operatorKind
()
==
ProOperator
::
NotOperator
)
result
+=
QLatin1Char
(
'!'
);
else
result
+=
QLatin1Char
(
'|'
);
break
;
}
break
;
}
case
ProItem
::
ValueKind
:
case
ProItem
::
BlockKind
:
break
;
// ### unhandled
...
...
@@ -847,7 +846,7 @@ QList<ProItem *> ProEditorModel::stringToExpression(const QString &exp) const
bool
c
=
false
;
QString
tmpstr
;
for
(
int
i
=
0
;
i
<
exp
.
length
();
++
i
)
{
for
(
int
i
=
0
;
i
<
exp
.
length
();
++
i
)
{
QChar
tmpchar
=
exp
.
at
(
i
);
if
(
tmpchar
==
'('
)
++
p
;
else
if
(
tmpchar
==
')'
)
--
p
;
...
...
shared/proparser/profileevaluator.cpp
View file @
342caa21
...
...
@@ -332,7 +332,7 @@ void ProFileEvaluator::Private::insertOperator(const char op)
updateItem
();
ProOperator
::
OperatorKind
opkind
;
switch
(
op
)
{
switch
(
op
)
{
case
'!'
:
opkind
=
ProOperator
::
NotOperator
;
break
;
...
...
@@ -532,21 +532,21 @@ bool ProFileEvaluator::Private::visitEndProFile(ProFile * pro)
evaluateFile
(
mkspecDirectory
+
"/features/default_post.prf"
,
&
ok
);
QStringList
processed
;
while
(
1
)
{
while
(
1
)
{
bool
finished
=
true
;
QStringList
configs
=
values
(
"CONFIG"
);
for
(
int
i
=
configs
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
for
(
int
i
=
configs
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
const
QString
config
=
configs
[
i
].
toLower
();
if
(
!
processed
.
contains
(
config
))
{
if
(
!
processed
.
contains
(
config
))
{
processed
.
append
(
config
);
evaluateFile
(
mkspecDirectory
+
"/features/"
+
config
+
".prf"
,
&
ok
);
if
(
ok
)
{
if
(
ok
)
{
finished
=
false
;
break
;
}
}
}
if
(
finished
)
if
(
finished
)
break
;
}
}
...
...
shared/proparser/proparserutils.h
View file @
342caa21
...
...
@@ -173,41 +173,41 @@ static QStringList split_arg_list(QString params)
const
QChar
*
params_data
=
params
.
data
();
const
int
params_len
=
params
.
length
();
int
last
=
0
;
while
(
last
<
params_len
&&
((
params_data
+
last
)
->
unicode
()
==
SPACE
while
(
last
<
params_len
&&
((
params_data
+
last
)
->
unicode
()
==
SPACE
/*|| (params_data+last)->unicode() == TAB*/
))
++
last
;
for
(
int
x
=
last
,
parens
=
0
;
x
<=
params_len
;
x
++
)
{
for
(
int
x
=
last
,
parens
=
0
;
x
<=
params_len
;
x
++
)
{
unicode
=
(
params_data
+
x
)
->
unicode
();
if
(
x
==
params_len
)
{
while
(
x
&&
(
params_data
+
(
x
-
1
))
->
unicode
()
==
SPACE
)
if
(
x
==
params_len
)
{
while
(
x
&&
(
params_data
+
(
x
-
1
))
->
unicode
()
==
SPACE
)
--
x
;
QString
mid
(
params_data
+
last
,
x
-
last
);
if
(
quote
)
{
if
(
mid
[
0
]
==
quote
&&
mid
[(
int
)
mid
.
length
()
-
1
]
==
quote
)
if
(
quote
)
{
if
(
mid
[
0
]
==
quote
&&
mid
[(
int
)
mid
.
length
()
-
1
]
==
quote
)
mid
=
mid
.
mid
(
1
,
mid
.
length
()
-
2
);
quote
=
0
;
}
args
<<
mid
;
break
;
}
if
(
unicode
==
LPAREN
)
{
if
(
unicode
==
LPAREN
)
{
--
parens
;
}
else
if
(
unicode
==
RPAREN
)
{
}
else
if
(
unicode
==
RPAREN
)
{
++
parens
;
}
else
if
(
quote
&&
unicode
==
quote
)
{
}
else
if
(
quote
&&
unicode
==
quote
)
{
quote
=
0
;
}
else
if
(
!
quote
&&
(
unicode
==
SINGLEQUOTE
||
unicode
==
DOUBLEQUOTE
))
{
}
else
if
(
!
quote
&&
(
unicode
==
SINGLEQUOTE
||
unicode
==
DOUBLEQUOTE
))
{
quote
=
unicode
;
}
else
if
(
!
parens
&&
!
quote
&&
unicode
==
COMMA
)
{
}
else
if
(
!
parens
&&
!
quote
&&
unicode
==
COMMA
)
{
QString
mid
=
params
.
mid
(
last
,
x
-
last
).
trimmed
();
args
<<
mid
;
last
=
x
+
1
;
while
(
last
<
params_len
&&
((
params_data
+
last
)
->
unicode
()
==
SPACE
while
(
last
<
params_len
&&
((
params_data
+
last
)
->
unicode
()
==
SPACE
/*|| (params_data+last)->unicode() == TAB*/
))
++
last
;
}
}
for
(
int
i
=
0
;
i
<
args
.
count
();
i
++
)
for
(
int
i
=
0
;
i
<
args
.
count
();
i
++
)
unquote
(
&
args
[
i
]);
return
args
;
}
...
...
@@ -227,22 +227,22 @@ static QStringList split_value_list(const QString &vals, bool do_semicolon=false
const
QChar
*
vals_data
=
vals
.
data
();
const
int
vals_len
=
vals
.
length
();
for
(
int
x
=
0
,
parens
=
0
;
x
<
vals_len
;
x
++
)
{
for
(
int
x
=
0
,
parens
=
0
;
x
<
vals_len
;
x
++
)
{
QChar
c
=
vals_data
[
x
];
if
(
x
!=
vals_len
-
1
&&
c
==
BACKSLASH
&&
vals_data
[
x
+
1
].
unicode
()
==
'\''
||
vals_data
[
x
+
1
]
==
DOUBLEQUOTE
)
{
build
+=
vals_data
[
x
++
];
// get that 'escape'
}
else
if
(
!
quote
.
isEmpty
()
&&
c
==
quote
.
top
())
{
quote
.
pop
();
}
else
if
(
c
==
SINGLEQUOTE
||
c
==
DOUBLEQUOTE
)
{
}
else
if
(
c
==
SINGLEQUOTE
||
c
==
DOUBLEQUOTE
)
{
quote
.
push
(
c
);
}
else
if
(
c
==
RPAREN
)
{
}
else
if
(
c
==
RPAREN
)
{
--
parens
;
}
else
if
(
c
==
LPAREN
)
{
}
else
if
(
c
==
LPAREN
)
{
++
parens
;
}
if
(
!
parens
&&
quote
.
isEmpty
()
&&
((
do_semicolon
&&
c
==
SEMICOLON
)
||
if
(
!
parens
&&
quote
.
isEmpty
()
&&
((
do_semicolon
&&
c
==
SEMICOLON
)
||
vals_data
[
x
]
==
Option
::
field_sep
))
{
ret
<<
build
;
build
.
clear
();
...
...
@@ -250,7 +250,7 @@ static QStringList split_value_list(const QString &vals, bool do_semicolon=false
build
+=
vals_data
[
x
];
}
}
if
(
!
build
.
isEmpty
())
if
(
!
build
.
isEmpty
())
ret
<<
build
;
return
ret
;
}
...
...
@@ -262,7 +262,7 @@ static QStringList qmake_mkspec_paths()
QByteArray
qmakepath
=
qgetenv
(
"QMAKEPATH"
);
if
(
!
qmakepath
.
isEmpty
())
{
const
QStringList
lst
=
splitPathList
(
QString
::
fromLocal8Bit
(
qmakepath
));
for
(
QStringList
::
ConstIterator
it
=
lst
.
begin
();
it
!=
lst
.
end
();
++
it
)
for
(
QStringList
::
ConstIterator
it
=
lst
.
begin
();
it
!=
lst
.
end
();
++
it
)
ret
<<
((
*
it
)
+
concat
);
}
ret
<<
QLibraryInfo
::
location
(
QLibraryInfo
::
DataPath
)
+
concat
;
...
...
shared/proparser/prowriter.cpp
View file @
342caa21
...
...
@@ -137,7 +137,7 @@ void ProWriter::writeBlock(ProBlock *block, const QString &indent)
if
(
block
->
blockKind
()
&
ProBlock
::
VariableKind
)
{
ProVariable
*
v
=
static_cast
<
ProVariable
*>
(
block
);
m_out
<<
v
->
variable
();
switch
(
v
->
variableOperator
())
{
switch
(
v
->
variableOperator
())
{
case
ProVariable
::
AddOperator
:
m_out
<<
QLatin1String
(
" += "
);
break
;
case
ProVariable
::
RemoveOperator
:
...
...
@@ -165,12 +165,12 @@ void ProWriter::writeBlock(ProBlock *block, const QString &indent)
}
QList
<
ProItem
*>
items
=
block
->
items
();
for
(
int
i
=
0
;
i
<
items
.
count
();
++
i
)
{
for
(
int
i
=
0
;
i
<
items
.
count
();
++
i
)
{
m_writeState
&=
~
LastItem
;
m_writeState
&=
~
FirstItem
;
if
(
i
==
0
)
m_writeState
|=
FirstItem
;
if
(
i
==
(
items
.
count
()
-
1
)
)
if
(
i
==
items
.
count
()
-
1
)
m_writeState
|=
LastItem
;
writeItem
(
items
.
at
(
i
),
newindent
);
}
...
...
shared/proparser/proxml.cpp
View file @
342caa21
...
...
@@ -104,7 +104,7 @@ QDomNode ProXmlParser::createItemNode(QDomDocument doc, ProItem *item) const
tag
=
doc
.
createElement
(
QLatin1String
(
"block"
));
}
foreach
(
ProItem
*
child
,
block
->
items
())
{
foreach
(
ProItem
*
child
,
block
->
items
())
{
QDomNode
childNode
=
createItemNode
(
doc
,
child
);
if
(
!
childNode
.
isNull
())
tag
.
appendChild
(
childNode
);
...
...
shared/proparser/valueeditor.cpp
View file @
342caa21
...
...
@@ -131,7 +131,7 @@ void ValueEditor::initialize()
connect
(
m_itemListWidget
,
SIGNAL
(
itemChanged
(
QListWidgetItem
*
)),
this
,
SLOT
(
updateItemChanges
(
QListWidgetItem
*
)));
foreach
(
ProVariableInfo
*
varinfo
,
m_infomanager
->
variables
())
{
foreach
(
ProVariableInfo
*
varinfo
,
m_infomanager
->
variables
())
{
m_varComboBox
->
addItem
(
varinfo
->
name
(),
varinfo
->
id
());
}
...
...
shared/qrceditor/resourcefile.cpp
View file @
342caa21
...
...
@@ -151,7 +151,7 @@ bool ResourceFile::save()
const
QStringList
name_list
=
prefixList
();
foreach
(
QString
name
,
name_list
)
{
foreach
(
const
QString
&
name
,
name_list
)
{
FileList
file_list
;
QString
lang
;
foreach
(
Prefix
*
pref
,
m_prefix_list
)
{
...
...
@@ -164,7 +164,7 @@ bool ResourceFile::save()
QDomElement
relt
=
doc
.
createElement
(
QLatin1String
(
"qresource"
));
root
.
appendChild
(
relt
);
relt
.
setAttribute
(
QLatin1String
(
"prefix"
),
name
);
if
(
!
lang
.
isEmpty
())
if
(
!
lang
.
isEmpty
())
relt
.
setAttribute
(
QLatin1String
(
"lang"
),
lang
);
foreach
(
const
File
*
f
,
file_list
)
{
...
...
@@ -622,14 +622,14 @@ QVariant ResourceModel::data(const QModelIndex &index, int role) const
// Prefix node
stringRes
=
prefix
->
name
;
const
QString
&
lang
=
prefix
->
lang
;
if
(
!
lang
.
isEmpty
())
if
(
!
lang
.
isEmpty
())
appendParenthesized
(
lang
,
stringRes
);
}
else
{
// File node
Q_ASSERT
(
file
!=
NULL
);
stringRes
=
QFileInfo
(
file
->
name
).
fileName
();
const
QString
alias
=
file
->
alias
;
if
(
!
alias
.
isEmpty
())
if
(
!
alias
.
isEmpty
())
appendParenthesized
(
alias
,
stringRes
);
}
result
=
stringRes
;
...
...
@@ -654,7 +654,7 @@ QVariant ResourceModel::data(const QModelIndex &index, int role) const
QString
conv_file
=
m_resource_file
.
relativePath
(
file
->
name
);
QString
stringRes
=
conv_file
.
replace
(
QDir
::
separator
(),
QLatin1Char
(
'/'
));
const
QString
&
alias_file
=
file
->
alias
;
if
(
!
alias_file
.
isEmpty
())
if
(
!
alias_file
.
isEmpty
())
appendParenthesized
(
alias_file
,
stringRes
);
result
=
stringRes
;
...
...
@@ -696,7 +696,7 @@ void ResourceModel::getItem(const QModelIndex &index, QString &prefix, QString &
QString
ResourceModel
::
lang
(
const
QModelIndex
&
index
)
const
{
if
(
!
index
.
isValid
())
if
(
!
index
.
isValid
())
return
QString
();
return
m_resource_file
.
lang
(
index
.
row
());
...
...
@@ -704,14 +704,14 @@ QString ResourceModel::lang(const QModelIndex &index) const
QString
ResourceModel
::
alias
(
const
QModelIndex
&
index
)
const
{
if
(
!
index
.
isValid
()
||
!
index
.
parent
().
isValid
())
if
(
!
index
.
isValid
()
||
!
index
.
parent
().
isValid
())
return
QString
();
return
m_resource_file
.
alias
(
index
.
parent
().
row
(),
index
.
row
());
}
QString
ResourceModel
::
file
(
const
QModelIndex
&
index
)
const
{
if
(
!
index
.
isValid
()
||
!
index
.
parent
().
isValid
())
if
(
!
index
.
isValid
()
||
!
index
.
parent
().
isValid
())
return
QString
();
return
m_resource_file
.
file
(
index
.
parent
().
row
(),
index
.
row
());
}
...
...
@@ -852,7 +852,7 @@ void ResourceModel::changePrefix(const QModelIndex &model_idx, const QString &pr
if
(
m_resource_file
.
prefix
(
prefix_idx
)
==
ResourceFile
::
fixPrefix
(
prefix
))
return
;
if
(
m_resource_file
.
contains
(
prefix
))
if
(
m_resource_file
.
contains
(
prefix
))
return
;
m_resource_file
.
replacePrefix
(
prefix_idx
,
prefix
);
...
...
@@ -880,7 +880,7 @@ void ResourceModel::changeAlias(const QModelIndex &index, const QString &alias)
if
(
!
index
.
parent
().
isValid
())
return
;
if
(
m_resource_file
.
alias
(
index
.
parent
().
row
(),
index
.
row
())
==
alias
)
if
(
m_resource_file
.
alias
(
index
.
parent
().
row
(),
index
.
row
())
==
alias
)
return
;
m_resource_file
.
replaceAlias
(
index
.
parent
().
row
(),
index
.
row
(),
alias
);
emit
dataChanged
(
index
,
index
);
...
...
shared/qrceditor/resourceview.cpp
View file @
342caa21
...
...
@@ -476,7 +476,7 @@ bool ResourceView::load(QString fileName)
const
QFileInfo
fi
(
fileName
);
m_qrcModel
->
setFileName
(
fi
.
absoluteFilePath
());
if
(
!
fi
.
exists
())
if
(
!
fi
.
exists
())
return
false
;
const
bool
result
=
m_qrcModel
->
reload
();
...
...
@@ -501,9 +501,8 @@ void ResourceView::changePrefix(const QModelIndex &index)
QString
const
prefixAfter
=
QInputDialog
::
getText
(
this
,
tr
(
"Change Prefix"
),
tr
(
"Input Prefix:"
),
QLineEdit
::
Normal
,
prefixBefore
,
&
ok
);
if
(
ok
)
{
if
(
ok
)
addUndoCommand
(
preindex
,
PrefixProperty
,
prefixBefore
,
prefixAfter
);
}
}
void
ResourceView
::
changeLang
(
const
QModelIndex
&
index
)
...
...
@@ -522,7 +521,7 @@ void ResourceView::changeLang(const QModelIndex &index)
void
ResourceView
::
changeAlias
(
const
QModelIndex
&
index
)
{
if
(
!
index
.
parent
().
isValid
())
if
(
!
index
.
parent
().
isValid
())
return
;
bool
ok
=
false
;
...
...
@@ -531,9 +530,8 @@ void ResourceView::changeAlias(const QModelIndex &index)
QString
const
aliasAfter
=
QInputDialog
::
getText
(
this
,
tr
(
"Change File Alias"
),
tr
(
"Alias:"
),
QLineEdit
::
Normal
,
aliasBefore
,
&
ok
);
if
(
ok
)
{
if
(
ok
)
addUndoCommand
(
index
,
AliasProperty
,
aliasBefore
,
aliasAfter
);
}
}
QString
ResourceView
::
currentAlias
()
const
...
...
@@ -585,15 +583,16 @@ void ResourceView::changeValue(const QModelIndex &nodeIndex, NodeProperty proper
}
}
void
ResourceView
::
advanceMergeId
()
{
void
ResourceView
::
advanceMergeId
()
{
m_mergeId
++
;
if
(
m_mergeId
<
0
)
{
if
(
m_mergeId
<
0
)
m_mergeId
=
0
;
}
}
void
ResourceView
::
addUndoCommand
(
const
QModelIndex
&
nodeIndex
,
NodeProperty
property
,
const
QString
&
before
,
const
QString
&
after
)
{
const
QString
&
before
,
const
QString
&
after
)
{
QUndoCommand
*
const
command
=
new
ModifyPropertyCommand
(
this
,
nodeIndex
,
property
,
m_mergeId
,
before
,
after
);
m_history
->
push
(
command
);
...
...
shared/qtsingleapplication/qtlocalpeer.cpp
View file @
342caa21
...
...
@@ -50,9 +50,9 @@ static PProcessIdToSessionId pProcessIdToSessionId = 0;
namespace
SharedTools
{
const
char
*
QtLocalPeer
::
ack
=
"ack"
;
const
char
*
QtLocalPeer
::
ack
=
"ack"
;
QtLocalPeer
::
QtLocalPeer
(
QObject
*
parent
,
const
QString
&
appId
)
QtLocalPeer
::
QtLocalPeer
(
QObject
*
parent
,
const
QString
&
appId
)
:
QObject
(
parent
),
id
(
appId
)
{
if
(
id
.
isEmpty
())
...
...
@@ -86,8 +86,6 @@ QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId)
lockFile
.
open
(
QIODevice
::
ReadWrite
);
}
bool
QtLocalPeer
::
isClient
()
{
if
(
lockFile
.
isLocked
())
...
...
@@ -105,7 +103,6 @@ bool QtLocalPeer::isClient()
return
false
;
}
bool
QtLocalPeer
::
sendMessage
(
const
QString
&
message
,
int
timeout
)
{
if
(
!
isClient
())
...
...
@@ -113,7 +110,7 @@ bool QtLocalPeer::sendMessage(const QString &message, int timeout)
QLocalSocket
socket
;
bool
connOk
=
false
;
for
(
int
i
=
0
;
i
<
2
;
i
++
)
{
for
(
int
i
=
0
;
i
<
2
;
i
++
)
{
// Try twice, in case the other instance is just starting up
socket
.
connectToServer
(
socketName
);
connOk
=
socket
.
waitForConnected
(
timeout
/
2
);
...
...
@@ -139,7 +136,6 @@ bool QtLocalPeer::sendMessage(const QString &message, int timeout)
return
res
;
}
void
QtLocalPeer
::
receiveConnection
()
{
QLocalSocket
*
socket
=
server
->
nextPendingConnection
();
...
...
src/libs/extensionsystem/pluginmanager.cpp
View file @
342caa21
...
...
@@ -422,12 +422,12 @@ void PluginManager::formatPluginVersions(QTextStream &str) const
void
PluginManager
::
startTests
()
{
#ifdef WITH_TESTS
foreach
(
PluginSpec
*
pluginSpec
,
d
->
testSpecs
)
{
foreach
(
PluginSpec
*
pluginSpec
,
d
->
testSpecs
)
{
const
QMetaObject
*
mo
=
pluginSpec
->
plugin
()
->
metaObject
();
QStringList
methods
;