Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
4442a927
Commit
4442a927
authored
Nov 11, 2013
by
Orgad Shaneh
Committed by
hjk
Nov 14, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Braces cleanup
Change-Id: I8413252c90a1487d291f15d92837c30ab697b245 Reviewed-by:
hjk
<
hjk121@nokiamail.com
>
parent
bfad6f10
Changes
61
Hide whitespace changes
Inline
Side-by-side
Showing
61 changed files
with
119 additions
and
212 deletions
+119
-212
src/libs/cplusplus/LookupContext.cpp
src/libs/cplusplus/LookupContext.cpp
+3
-6
src/libs/cplusplus/ResolveExpression.cpp
src/libs/cplusplus/ResolveExpression.cpp
+1
-2
src/libs/qmljs/qmljslink.cpp
src/libs/qmljs/qmljslink.cpp
+1
-2
src/libs/qmljs/qmljsqrcparser.cpp
src/libs/qmljs/qmljsqrcparser.cpp
+3
-5
src/libs/qmljs/qmljstypedescriptionreader.cpp
src/libs/qmljs/qmljstypedescriptionreader.cpp
+1
-2
src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp
src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp
+2
-3
src/plugins/android/androiddeploystepwidget.cpp
src/plugins/android/androiddeploystepwidget.cpp
+1
-2
src/plugins/android/androidmanager.cpp
src/plugins/android/androidmanager.cpp
+4
-8
src/plugins/android/androidmanifesteditorwidget.cpp
src/plugins/android/androidmanifesteditorwidget.cpp
+2
-4
src/plugins/baremetal/baremetalgdbcommandsdeploystep.cpp
src/plugins/baremetal/baremetalgdbcommandsdeploystep.cpp
+1
-2
src/plugins/cmakeprojectmanager/cmakeparser.cpp
src/plugins/cmakeprojectmanager/cmakeparser.cpp
+2
-3
src/plugins/coreplugin/editormanager/editormanager.cpp
src/plugins/coreplugin/editormanager/editormanager.cpp
+1
-2
src/plugins/coreplugin/editormanager/openeditorswindow.cpp
src/plugins/coreplugin/editormanager/openeditorswindow.cpp
+1
-2
src/plugins/cppeditor/cppfollowsymbolundercursor.cpp
src/plugins/cppeditor/cppfollowsymbolundercursor.cpp
+1
-2
src/plugins/cpptools/includeutils.cpp
src/plugins/cpptools/includeutils.cpp
+2
-3
src/plugins/cpptools/searchsymbols.cpp
src/plugins/cpptools/searchsymbols.cpp
+1
-2
src/plugins/debugger/imageviewer.cpp
src/plugins/debugger/imageviewer.cpp
+2
-3
src/plugins/debugger/lldb/lldbengine.cpp
src/plugins/debugger/lldb/lldbengine.cpp
+2
-3
src/plugins/diffeditor/diffeditorplugin.cpp
src/plugins/diffeditor/diffeditorplugin.cpp
+1
-2
src/plugins/diffeditor/diffeditorwidget.cpp
src/plugins/diffeditor/diffeditorwidget.cpp
+2
-3
src/plugins/diffeditor/differ.cpp
src/plugins/diffeditor/differ.cpp
+7
-12
src/plugins/diffeditor/diffshoweditor.cpp
src/plugins/diffeditor/diffshoweditor.cpp
+2
-3
src/plugins/find/treeviewfind.cpp
src/plugins/find/treeviewfind.cpp
+1
-2
src/plugins/git/branchmodel.cpp
src/plugins/git/branchmodel.cpp
+1
-2
src/plugins/git/gitclient.cpp
src/plugins/git/gitclient.cpp
+1
-2
src/plugins/ios/iosrunconfiguration.cpp
src/plugins/ios/iosrunconfiguration.cpp
+1
-2
src/plugins/projectexplorer/abstractmsvctoolchain.cpp
src/plugins/projectexplorer/abstractmsvctoolchain.cpp
+3
-6
src/plugins/projectexplorer/compileoutputwindow.cpp
src/plugins/projectexplorer/compileoutputwindow.cpp
+2
-3
src/plugins/projectexplorer/projectexplorer.cpp
src/plugins/projectexplorer/projectexplorer.cpp
+1
-2
src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
...gins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
+1
-2
src/plugins/qmakeprojectmanager/wizards/abstractmobileapp.cpp
...plugins/qmakeprojectmanager/wizards/abstractmobileapp.cpp
+2
-3
src/plugins/qmakeprojectmanager/wizards/librarywizarddialog.cpp
...ugins/qmakeprojectmanager/wizards/librarywizarddialog.cpp
+1
-2
src/plugins/qmldesigner/components/importmanager/importlabel.cpp
...gins/qmldesigner/components/importmanager/importlabel.cpp
+2
-3
src/plugins/qmldesigner/components/integration/designdocument.cpp
...ins/qmldesigner/components/integration/designdocument.cpp
+3
-5
src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp
...s/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp
+4
-7
src/plugins/qmldesigner/components/propertyeditor/gradientmodel.cpp
...s/qmldesigner/components/propertyeditor/gradientmodel.cpp
+6
-11
src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp
...designer/components/propertyeditor/propertyeditorview.cpp
+1
-2
src/plugins/qmldesigner/components/propertyeditor/qmlanchorbindingproxy.cpp
...igner/components/propertyeditor/qmlanchorbindingproxy.cpp
+4
-7
src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp
...ins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp
+2
-3
src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
...lugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
+1
-2
src/plugins/qmldesigner/designercore/model/model.cpp
src/plugins/qmldesigner/designercore/model/model.cpp
+4
-8
src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp
...gins/qmldesigner/designercore/model/texttomodelmerger.cpp
+1
-2
src/plugins/qmldesigner/qmldesignerplugin.cpp
src/plugins/qmldesigner/qmldesignerplugin.cpp
+2
-4
src/plugins/qmljstools/qmljsmodelmanager.cpp
src/plugins/qmljstools/qmljsmodelmanager.cpp
+2
-4
src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp
src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp
+2
-4
src/plugins/qmlprofiler/qmlprofilerengine.cpp
src/plugins/qmlprofiler/qmlprofilerengine.cpp
+2
-3
src/plugins/qmlprofiler/qmlprofilertracefile.cpp
src/plugins/qmlprofiler/qmlprofilertracefile.cpp
+1
-2
src/plugins/qmlprofiler/qmlprofilertraceview.cpp
src/plugins/qmlprofiler/qmlprofilertraceview.cpp
+1
-2
src/plugins/qmlprofiler/timelinemodelaggregator.cpp
src/plugins/qmlprofiler/timelinemodelaggregator.cpp
+2
-3
src/plugins/qmlprofiler/timelinerenderer.cpp
src/plugins/qmlprofiler/timelinerenderer.cpp
+2
-4
src/plugins/qmlprojectmanager/fileformat/qmlprojectfileformat.cpp
...ins/qmlprojectmanager/fileformat/qmlprojectfileformat.cpp
+1
-2
src/plugins/qmlprojectmanager/qmlapp.cpp
src/plugins/qmlprojectmanager/qmlapp.cpp
+3
-4
src/plugins/qmlprojectmanager/qmlproject.cpp
src/plugins/qmlprojectmanager/qmlproject.cpp
+2
-3
src/plugins/qnx/blackberrydeviceconfigurationwizardpages.cpp
src/plugins/qnx/blackberrydeviceconfigurationwizardpages.cpp
+1
-2
src/plugins/qnx/blackberrydevicelistdetector.cpp
src/plugins/qnx/blackberrydevicelistdetector.cpp
+1
-2
src/plugins/qnx/cascadesimport/bardescriptorconverter.cpp
src/plugins/qnx/cascadesimport/bardescriptorconverter.cpp
+1
-2
src/plugins/qnx/qnxutils.cpp
src/plugins/qnx/qnxutils.cpp
+2
-3
src/plugins/qtsupport/exampleslistmodel.cpp
src/plugins/qtsupport/exampleslistmodel.cpp
+3
-6
src/plugins/texteditor/basetexteditor.cpp
src/plugins/texteditor/basetexteditor.cpp
+2
-4
src/plugins/texteditor/highlighterutils.cpp
src/plugins/texteditor/highlighterutils.cpp
+1
-2
src/plugins/vcsbase/command.cpp
src/plugins/vcsbase/command.cpp
+3
-4
No files found.
src/libs/cplusplus/LookupContext.cpp
View file @
4442a927
...
...
@@ -344,9 +344,8 @@ ClassOrNamespace *LookupContext::lookupType(const Name *name, Scope *scope,
if
(
name
->
isNameId
())
{
if
(
const
Name
*
usingDeclarationName
=
ud
->
name
())
{
if
(
const
QualifiedNameId
*
q
=
usingDeclarationName
->
asQualifiedNameId
())
{
if
(
q
->
name
()
&&
q
->
name
()
->
isEqualTo
(
name
))
{
if
(
q
->
name
()
&&
q
->
name
()
->
isEqualTo
(
name
))
return
bindings
()
->
globalNamespace
()
->
lookupType
(
q
);
}
}
}
}
...
...
@@ -802,9 +801,8 @@ ClassOrNamespace *ClassOrNamespace::findBlock(Block *block)
flush
();
QHash
<
Block
*
,
ClassOrNamespace
*>::
const_iterator
citBlock
=
_blocks
.
find
(
block
);
if
(
citBlock
!=
_blocks
.
end
())
{
if
(
citBlock
!=
_blocks
.
end
())
return
citBlock
.
value
();
}
for
(
citBlock
=
_blocks
.
begin
();
citBlock
!=
_blocks
.
end
();
++
citBlock
)
{
if
(
ClassOrNamespace
*
foundNestedBlock
=
citBlock
.
value
()
->
findBlock
(
block
))
...
...
@@ -1110,9 +1108,8 @@ ClassOrNamespace *ClassOrNamespace::nestedType(const Name *name, ClassOrNamespac
for
(
unsigned
i
=
0
;
i
<
klassMemberCount
;
++
i
){
Symbol
*
klassMemberAsSymbol
=
klass
->
memberAt
(
i
);
if
(
klassMemberAsSymbol
->
isTypedef
())
{
if
(
Declaration
*
declaration
=
klassMemberAsSymbol
->
asDeclaration
())
{
if
(
Declaration
*
declaration
=
klassMemberAsSymbol
->
asDeclaration
())
qDebug
()
<<
"Member: "
<<
oo
(
declaration
->
type
(),
declaration
->
name
());
}
}
}
}
...
...
src/libs/cplusplus/ResolveExpression.cpp
View file @
4442a927
...
...
@@ -1121,9 +1121,8 @@ ClassOrNamespace *ResolveExpression::baseExpression(const QList<LookupItem> &bas
if
(
!
isTypeTypedefed
(
originalType
,
ty
)
||
!
areOriginalAndTypedefedTypePointer
(
originalType
,
ty
))
{
*
replacedDotOperator
=
originalType
->
isPointerType
()
||
ty
->
isPointerType
();
if
(
PointerType
*
ptrTy
=
ty
->
asPointerType
())
{
if
(
PointerType
*
ptrTy
=
ty
->
asPointerType
())
ty
=
ptrTy
->
elementType
();
}
}
}
...
...
src/libs/qmljs/qmljslink.cpp
View file @
4442a927
...
...
@@ -311,9 +311,8 @@ Import LinkPrivate::importFileOrDirectory(Document::Ptr doc, const ImportInfo &i
QLocale
locale
;
QStringList
filePaths
=
ModelManagerInterface
::
instance
()
->
filesAtQrcPath
(
path
,
&
locale
,
0
,
ModelManagerInterface
::
ActiveQrcResources
);
if
(
filePaths
.
isEmpty
())
{
if
(
filePaths
.
isEmpty
())
filePaths
=
ModelManagerInterface
::
instance
()
->
filesAtQrcPath
(
path
);
}
if
(
!
filePaths
.
isEmpty
())
{
Document
::
Ptr
importedDoc
=
snapshot
.
document
(
filePaths
.
at
(
0
));
if
(
importedDoc
)
...
...
src/libs/qmljs/qmljsqrcparser.cpp
View file @
4442a927
...
...
@@ -111,11 +111,10 @@ private:
QString
QrcParser
::
normalizedQrcFilePath
(
const
QString
&
path
)
{
QString
normPath
=
path
;
int
endPrefix
=
0
;
if
(
path
.
startsWith
(
QLatin1String
(
"qrc:/"
)))
{
if
(
path
.
startsWith
(
QLatin1String
(
"qrc:/"
)))
endPrefix
=
4
;
}
else
if
(
path
.
startsWith
(
QLatin1String
(
":/"
)))
{
else
if
(
path
.
startsWith
(
QLatin1String
(
":/"
)))
endPrefix
=
1
;
}
if
(
endPrefix
<
path
.
size
()
&&
path
.
at
(
endPrefix
)
==
QLatin1Char
(
'/'
))
while
(
endPrefix
+
1
<
path
.
size
()
&&
path
.
at
(
endPrefix
+
1
)
==
QLatin1Char
(
'/'
))
++
endPrefix
;
...
...
@@ -377,9 +376,8 @@ void QrcParserPrivate::collectFilesInPath(const QString &path, QMap<QString,QStr
QString
fileName
=
res
.
key
().
right
(
res
.
key
().
size
()
-
key
.
size
());
QStringList
&
els
=
(
*
contents
)[
fileName
];
foreach
(
const
QString
&
val
,
res
.
value
())
if
(
!
els
.
contains
(
val
))
{
if
(
!
els
.
contains
(
val
))
els
<<
val
;
}
++
res
;
}
else
{
QString
dirName
=
res
.
key
().
mid
(
key
.
size
(),
endDir
-
key
.
size
()
+
1
);
...
...
src/libs/qmljs/qmljstypedescriptionreader.cpp
View file @
4442a927
...
...
@@ -632,8 +632,7 @@ void TypeDescriptionReader::readEnumValues(AST::UiScriptBinding *ast, LanguageUt
continue
;
}
PropertyGetterSetter
*
getterSetter
=
AST
::
cast
<
PropertyGetterSetter
*>
(
it
->
assignment
);
if
(
getterSetter
)
{
if
(
getterSetter
)
addError
(
objectLit
->
firstSourceLocation
(),
tr
(
"Enum should not contain getter and setters, but only 'string: number' elements."
));
}
}
}
src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp
View file @
4442a927
...
...
@@ -1011,11 +1011,10 @@ extern "C" HRESULT CALLBACK stack(CIDebugClient *Client, PCSTR argsIn)
tokens
.
pop_front
();
}
if
(
!
tokens
.
empty
())
{
if
(
tokens
.
front
()
==
"unlimited"
)
{
if
(
tokens
.
front
()
==
"unlimited"
)
maxFrames
=
1000
;
}
else
{
else
integerFromString
(
tokens
.
front
(),
&
maxFrames
);
}
}
const
std
::
string
stack
=
gdbmiStack
(
exc
.
control
(),
exc
.
symbols
(),
...
...
src/plugins/android/androiddeploystepwidget.cpp
View file @
4442a927
...
...
@@ -117,9 +117,8 @@ void AndroidDeployStepWidget::setQASIPackagePath()
QString
packagePath
=
QFileDialog
::
getOpenFileName
(
this
,
tr
(
"Qt Android Smart Installer"
),
QDir
::
homePath
(),
tr
(
"Android package (*.apk)"
));
if
(
!
packagePath
.
isEmpty
())
{
if
(
!
packagePath
.
isEmpty
())
AndroidManager
::
installQASIPackage
(
m_step
->
target
(),
packagePath
);
}
}
...
...
src/plugins/android/androidmanager.cpp
View file @
4442a927
...
...
@@ -367,15 +367,13 @@ bool AndroidManager::bundleQt(ProjectExplorer::Target *target)
{
AndroidDeployStep
*
androidDeployStep
=
AndroidGlobal
::
buildStep
<
AndroidDeployStep
>
(
target
->
activeDeployConfiguration
());
if
(
androidDeployStep
)
{
if
(
androidDeployStep
)
return
androidDeployStep
->
deployAction
()
==
AndroidDeployStep
::
BundleLibraries
;
}
AndroidDeployQtStep
*
androidDeployQtStep
=
AndroidGlobal
::
buildStep
<
AndroidDeployQtStep
>
(
target
->
activeDeployConfiguration
());
if
(
androidDeployQtStep
)
{
if
(
androidDeployQtStep
)
return
androidDeployQtStep
->
deployAction
()
==
AndroidDeployQtStep
::
BundleLibrariesDeployment
;
}
return
false
;
}
...
...
@@ -819,9 +817,8 @@ QVector<AndroidManager::Library> AndroidManager::availableQtLibsWithDependencies
if
(
!
qmakeProject
||
!
version
)
return
QVector
<
AndroidManager
::
Library
>
();
QString
qtLibsPath
=
version
->
qmakeProperty
(
"QT_INSTALL_LIBS"
);
if
(
!
readelfPath
.
toFileInfo
().
exists
())
{
if
(
!
readelfPath
.
toFileInfo
().
exists
())
return
QVector
<
AndroidManager
::
Library
>
();
}
LibrariesMap
mapLibs
;
QDir
libPath
;
QDirIterator
it
(
qtLibsPath
,
QStringList
()
<<
QLatin1String
(
"*.so"
),
QDir
::
Files
,
QDirIterator
::
Subdirectories
);
...
...
@@ -997,9 +994,8 @@ QString AndroidManager::loadLocal(ProjectExplorer::Target *target, int apiLevel,
dependencyLib
=
dependencyLib
.
arg
(
apiLevel
);
if
(
libElement
.
hasAttribute
(
QLatin1String
(
"extends"
)))
{
const
QString
extends
=
libElement
.
attribute
(
QLatin1String
(
"extends"
));
if
(
libs
.
contains
(
extends
))
{
if
(
libs
.
contains
(
extends
))
dependencyLibs
<<
dependencyLib
;
}
}
else
if
(
!
dependencyLibs
.
contains
(
dependencyLib
))
{
dependencyLibs
<<
dependencyLib
;
}
...
...
src/plugins/android/androidmanifesteditorwidget.cpp
View file @
4442a927
...
...
@@ -455,9 +455,8 @@ void AndroidManifestEditorWidget::initializePage()
bool
AndroidManifestEditorWidget
::
eventFilter
(
QObject
*
obj
,
QEvent
*
event
)
{
if
(
obj
==
m_targetLineEdit
)
{
if
(
event
->
type
()
==
QEvent
::
FocusIn
)
{
if
(
event
->
type
()
==
QEvent
::
FocusIn
)
QTimer
::
singleShot
(
0
,
this
,
SLOT
(
updateTargetComboBox
()));
}
}
if
(
obj
==
m_overlayWidget
)
...
...
@@ -561,9 +560,8 @@ bool AndroidManifestEditorWidget::setActivePage(EditorPage page)
syncToEditor
();
setFocus
();
}
else
{
if
(
!
syncToWidgets
())
{
if
(
!
syncToWidgets
())
return
false
;
}
QWidget
*
fw
=
m_overlayWidget
->
focusWidget
();
if
(
fw
&&
fw
!=
m_overlayWidget
)
...
...
src/plugins/baremetal/baremetalgdbcommandsdeploystep.cpp
View file @
4442a927
...
...
@@ -44,9 +44,8 @@ BareMetalGdbCommandsDeployStepWidget::BareMetalGdbCommandsDeployStepWidget(BareM
m_commands
=
new
QPlainTextEdit
(
this
);
fl
->
addRow
(
tr
(
"GDB commands:"
),
m_commands
);
m_commands
->
setPlainText
(
m_step
.
gdbCommands
());
if
(
!
connect
(
m_commands
,
SIGNAL
(
textChanged
()),
SLOT
(
update
())))
{
if
(
!
connect
(
m_commands
,
SIGNAL
(
textChanged
()),
SLOT
(
update
())))
qDebug
()
<<
"BareMetalGdbCommandsDeployStepWidget connect failed."
;
}
}
void
BareMetalGdbCommandsDeployStepWidget
::
update
()
...
...
src/plugins/cmakeprojectmanager/cmakeparser.cpp
View file @
4442a927
...
...
@@ -58,11 +58,10 @@ void CMakeParser::stdError(const QString &line)
{
QString
trimmedLine
=
rightTrimmed
(
line
);
if
(
trimmedLine
.
isEmpty
()
&&
!
m_lastTask
.
isNull
())
{
if
(
m_skippedFirstEmptyLine
)
{
if
(
m_skippedFirstEmptyLine
)
doFlush
();
}
else
{
else
m_skippedFirstEmptyLine
=
true
;
}
return
;
}
if
(
m_skippedFirstEmptyLine
)
...
...
src/plugins/coreplugin/editormanager/editormanager.cpp
View file @
4442a927
...
...
@@ -728,9 +728,8 @@ void EditorManager::closeView(Core::Internal::EditorView *view)
bool
EditorManager
::
closeAllEditors
(
bool
askAboutModifiedEditors
)
{
d
->
m_documentModel
->
removeAllRestoredDocuments
();
if
(
closeDocuments
(
d
->
m_documentModel
->
openedDocuments
(),
askAboutModifiedEditors
))
{
if
(
closeDocuments
(
d
->
m_documentModel
->
openedDocuments
(),
askAboutModifiedEditors
))
return
true
;
}
return
false
;
}
...
...
src/plugins/coreplugin/editormanager/openeditorswindow.cpp
View file @
4442a927
...
...
@@ -270,8 +270,7 @@ void OpenEditorsWindow::addHistoryItems(const QList<EditLocation> &history, Edit
m_editorList
->
addTopLevelItem
(
item
);
if
(
m_editorList
->
topLevelItemCount
()
==
1
)
{
if
(
m_editorList
->
topLevelItemCount
()
==
1
)
m_editorList
->
setCurrentItem
(
item
);
}
}
}
src/plugins/cppeditor/cppfollowsymbolundercursor.cpp
View file @
4442a927
...
...
@@ -468,9 +468,8 @@ BaseTextEditorWidget::Link FollowSymbolUnderCursor::findLink(const QTextCursor &
// token[.....] == ....
// token[i + n] == T_RPAREN
if
(
i
+
1
<
tokens
.
size
()
&&
tokens
.
at
(
i
+
1
).
is
(
T_LPAREN
))
{
if
(
i
+
1
<
tokens
.
size
()
&&
tokens
.
at
(
i
+
1
).
is
(
T_LPAREN
))
closingParenthesisPos
=
skipMatchingParentheses
(
tokens
,
i
-
1
,
0
);
}
}
else
if
((
i
>
3
&&
tk
.
is
(
T_LPAREN
)
&&
tokens
.
at
(
i
-
1
).
is
(
T_IDENTIFIER
)
&&
tokens
.
at
(
i
-
2
).
is
(
T_LPAREN
)
&&
(
tokens
.
at
(
i
-
3
).
is
(
T_SIGNAL
)
||
tokens
.
at
(
i
-
3
).
is
(
T_SLOT
))))
{
...
...
src/plugins/cpptools/includeutils.cpp
View file @
4442a927
...
...
@@ -242,11 +242,10 @@ int LineForNewIncludeDirective::operator()(const QString &newIncludeFileName,
if
(
group
.
commonIncludeDir
()
==
IncludeGroup
::
includeDir
(
pureIncludeFileName
))
localBestIncludeGroup
=
group
;
}
if
(
!
localBestIncludeGroup
.
isEmpty
())
{
if
(
!
localBestIncludeGroup
.
isEmpty
())
bestGroup
=
localBestIncludeGroup
;
}
else
{
else
bestGroup
=
groupsMixedIncludeDirs
.
last
();
}
}
}
...
...
src/plugins/cpptools/searchsymbols.cpp
View file @
4442a927
...
...
@@ -141,9 +141,8 @@ bool SearchSymbols::visit(Class *symbol)
QString
name
=
symbolName
(
symbol
);
QString
scopedName
=
scopedSymbolName
(
name
);
QString
previousScope
=
switchScope
(
scopedName
);
if
(
symbolsToSearchFor
&
SymbolSearcher
::
Classes
)
{
if
(
symbolsToSearchFor
&
SymbolSearcher
::
Classes
)
appendItem
(
name
,
QString
(),
previousScope
,
ModelItemInfo
::
Class
,
symbol
);
}
for
(
unsigned
i
=
0
;
i
<
symbol
->
memberCount
();
++
i
)
{
accept
(
symbol
->
memberAt
(
i
));
}
...
...
src/plugins/debugger/imageviewer.cpp
View file @
4442a927
...
...
@@ -155,11 +155,10 @@ void ImageViewer::contextMenuEvent(QContextMenuEvent *ev)
copyAction
->
setEnabled
(
hasImage
);
imageViewerAction
->
setEnabled
(
hasImage
);
QAction
*
action
=
menu
.
exec
(
ev
->
globalPos
());
if
(
action
==
copyAction
)
{
if
(
action
==
copyAction
)
QApplication
::
clipboard
()
->
setImage
(
image
);
}
else
if
(
action
==
imageViewerAction
)
{
else
if
(
action
==
imageViewerAction
)
openImageViewer
(
image
);
}
}
#include "imageviewer.moc"
src/plugins/debugger/lldb/lldbengine.cpp
View file @
4442a927
...
...
@@ -148,11 +148,10 @@ void LldbEngine::abortDebugger()
void
LldbEngine
::
setupEngine
()
{
QTC_ASSERT
(
state
()
==
EngineSetupRequested
,
qDebug
()
<<
state
());
if
(
startParameters
().
remoteSetupNeeded
)
{
if
(
startParameters
().
remoteSetupNeeded
)
notifyEngineRequestRemoteSetup
();
}
else
{
else
startLldb
();
}
}
void
LldbEngine
::
startLldb
()
...
...
src/plugins/diffeditor/diffeditorplugin.cpp
View file @
4442a927
...
...
@@ -128,9 +128,8 @@ void DiffEditorPlugin::diff()
QString
DiffEditorPlugin
::
getFileContents
(
const
QString
&
fileName
,
QTextCodec
*
codec
)
const
{
QFile
file
(
fileName
);
if
(
file
.
open
(
QIODevice
::
ReadOnly
|
QIODevice
::
Text
))
{
if
(
file
.
open
(
QIODevice
::
ReadOnly
|
QIODevice
::
Text
))
return
codec
->
toUnicode
(
file
.
readAll
());
}
return
QString
();
}
...
...
src/plugins/diffeditor/diffeditorwidget.cpp
View file @
4442a927
...
...
@@ -1051,11 +1051,10 @@ ChunkData DiffEditorWidget::calculateOriginalData(const QList<Diff> &diffList) c
const
QStringList
lines
=
diff
.
text
.
split
(
QLatin1Char
(
'\n'
));
const
bool
equal
=
isEqual
(
diffList
,
i
);
if
(
diff
.
command
==
Diff
::
Insert
)
{
if
(
diff
.
command
==
Diff
::
Insert
)
lastRightLineEqual
=
lastRightLineEqual
&&
equal
;
}
else
if
(
diff
.
command
==
Diff
::
Delete
)
{
else
if
(
diff
.
command
==
Diff
::
Delete
)
lastLeftLineEqual
=
lastLeftLineEqual
&&
equal
;
}
const
int
lastLeftPos
=
currentLeftPos
;
const
int
lastRightPos
=
currentRightPos
;
...
...
src/plugins/diffeditor/differ.cpp
View file @
4442a927
...
...
@@ -405,11 +405,10 @@ QList<Diff> Differ::diffMyers(const QString &text1, const QString &text2)
k
<=
qMin
(
d
,
kMaxForward
-
qAbs
(
d
+
kMaxForward
)
%
2
);
k
=
k
+
2
)
{
int
x
;
if
(
k
==
-
d
||
(
k
<
d
&&
forwardV
[
k
+
vShift
-
1
]
<
forwardV
[
k
+
vShift
+
1
]))
{
if
(
k
==
-
d
||
(
k
<
d
&&
forwardV
[
k
+
vShift
-
1
]
<
forwardV
[
k
+
vShift
+
1
]))
x
=
forwardV
[
k
+
vShift
+
1
];
// copy vertically from diagonal k + 1, y increases, y may exceed the graph
}
else
{
else
x
=
forwardV
[
k
+
vShift
-
1
]
+
1
;
// copy horizontally from diagonal k - 1, x increases, x may exceed the graph
}
int
y
=
x
-
k
;
if
(
x
>
n
)
{
...
...
@@ -441,11 +440,10 @@ QList<Diff> Differ::diffMyers(const QString &text1, const QString &text2)
k
<=
qMin
(
d
,
kMaxReverse
-
qAbs
(
d
+
kMaxReverse
)
%
2
);
k
=
k
+
2
)
{
int
x
;
if
(
k
==
-
d
||
(
k
<
d
&&
reverseV
[
k
+
vShift
-
1
]
<
reverseV
[
k
+
vShift
+
1
]))
{
if
(
k
==
-
d
||
(
k
<
d
&&
reverseV
[
k
+
vShift
-
1
]
<
reverseV
[
k
+
vShift
+
1
]))
x
=
reverseV
[
k
+
vShift
+
1
];
}
else
{
else
x
=
reverseV
[
k
+
vShift
-
1
]
+
1
;
}
int
y
=
x
-
k
;
if
(
x
>
n
)
{
...
...
@@ -559,9 +557,8 @@ int Differ::findSubtextEnd(const QString &text,
{
if
(
m_currentDiffMode
==
Differ
::
LineMode
)
{
int
subtextEnd
=
text
.
indexOf
(
QLatin1Char
(
'\n'
),
subtextStart
);
if
(
subtextEnd
==
-
1
)
{
if
(
subtextEnd
==
-
1
)
subtextEnd
=
text
.
count
()
-
1
;
}
return
++
subtextEnd
;
}
else
if
(
m_currentDiffMode
==
Differ
::
WordMode
)
{
if
(
!
text
.
at
(
subtextStart
).
isLetter
())
...
...
@@ -732,9 +729,8 @@ QList<Diff> Differ::cleanupSemantics(const QList<Diff> &diffList)
}
equalitiesToBeSplit
.
insert
(
data
.
equalityIndex
,
true
);
equalities
.
removeAt
(
i
);
if
(
i
>
0
)
{
if
(
i
>
0
)
i
--
;
// reexamine previous equality
}
}
else
{
i
++
;
}
...
...
@@ -807,9 +803,8 @@ QList<Diff> Differ::cleanupSemanticsLossless(const QList<Diff> &diffList)
thisDiff
.
text
=
bestEdit
;
nextDiff
.
text
=
bestEquality2
;
if
(
!
bestEquality1
.
isEmpty
())
{
if
(
!
bestEquality1
.
isEmpty
())
newDiffList
.
append
(
prevDiff
);
// append modified equality1
}
if
(
bestEquality2
.
isEmpty
())
{
i
++
;
if
(
i
<
diffList
.
count
())
...
...
src/plugins/diffeditor/diffshoweditor.cpp
View file @
4442a927
...
...
@@ -163,11 +163,10 @@ QWidget *DiffShowEditor::toolBar()
void
DiffShowEditor
::
setDescriptionVisible
(
bool
visible
)
{
if
(
visible
)
{
if
(
visible
)
m_toggleDescriptionButton
->
setToolTip
(
tr
(
"Hide Change Description"
));
}
else
{
else
m_toggleDescriptionButton
->
setToolTip
(
tr
(
"Show Change Description"
));
}
m_diffShowWidget
->
setVisible
(
visible
);
}
...
...
src/plugins/find/treeviewfind.cpp
View file @
4442a927
...
...
@@ -207,9 +207,8 @@ QModelIndex TreeViewFind::nextIndex(const QModelIndex &idx, bool *wrapped) const
QModelIndex
current
=
model
->
index
(
idx
.
row
(),
0
,
idx
.
parent
());
// check for children
if
(
model
->
rowCount
(
current
)
>
0
)
{
if
(
model
->
rowCount
(
current
)
>
0
)
return
current
.
child
(
0
,
0
);
}
// no more children, go up and look for parent with more children
QModelIndex
nextIndex
;
...
...
src/plugins/git/branchmodel.cpp
View file @
4442a927
...
...
@@ -380,9 +380,8 @@ void BranchModel::setCurrentBranch()
BranchNode
*
local
=
m_rootNode
->
children
.
at
(
LocalBranches
);
int
pos
=
0
;
for
(
pos
=
0
;
pos
<
local
->
count
();
++
pos
)
{
if
(
local
->
children
.
at
(
pos
)
->
name
==
currentBranch
)
{
if
(
local
->
children
.
at
(
pos
)
->
name
==
currentBranch
)
m_currentBranch
=
local
->
children
[
pos
];
}
}
}
...
...
src/plugins/git/gitclient.cpp
View file @
4442a927
...
...
@@ -537,9 +537,8 @@ QString GitDiffHandler::workingTreeContents(const QString &fileName) const
QString
absoluteFileName
=
workingDir
.
absoluteFilePath
(
fileName
);
QFile
file
(
absoluteFileName
);
if
(
file
.
open
(
QIODevice
::
ReadOnly
|
QIODevice
::
Text
))
{
if
(
file
.
open
(
QIODevice
::
ReadOnly
|
QIODevice
::
Text
))
return
m_editor
->
editorWidget
()
->
codec
()
->
toUnicode
(
file
.
readAll
());
}
return
QString
();
}
...
...
src/plugins/ios/iosrunconfiguration.cpp
View file @
4442a927
...
...
@@ -145,9 +145,8 @@ QString IosRunConfiguration::appName() const
const
QmakeProFileNode
*
node
=
pro
->
rootQmakeProjectNode
()
->
findProFileFor
(
profilePath
());
if
(
node
)
{
TargetInformation
ti
=
node
->
targetInformation
();
if
(
ti
.
valid
)
{
if
(
ti
.
valid
)
return
ti
.
target
;
}
}
}
qDebug
()
<<
"IosRunConfiguration::appName failed"
;
...
...
src/plugins/projectexplorer/abstractmsvctoolchain.cpp
View file @
4442a927
...
...
@@ -342,19 +342,16 @@ void AbstractMsvcToolChain::inferWarningsForLevel(int warningLevel, WarningFlags
// reset all except unrelated flag
flags
=
flags
&
WarningsAsErrors
;
if
(
warningLevel
>=
1
)
{
if
(
warningLevel
>=
1
)
flags
|=
WarningFlags
(
WarningsDefault
|
WarnIgnoredQualfiers
|
WarnHiddenLocals
|
WarnUnknownPragma
);
}
if
(
warningLevel
>=
2
)
{
if
(
warningLevel
>=
2
)
flags
|=
WarningsAll
;
}
if
(
warningLevel
>=
3
)
{
flags
|=
WarningFlags
(
WarningsExtra
|
WarnNonVirtualDestructor
|
WarnSignedComparison
|
WarnUnusedLocals
|
WarnDeprecated
);
}
if
(
warningLevel
>=
4
)
{
if
(
warningLevel
>=
4
)
flags
|=
WarnUnusedParams
;
}
}
bool
AbstractMsvcToolChain
::
operator
==
(
const
ToolChain
&
other
)
const
...
...
src/plugins/projectexplorer/compileoutputwindow.cpp
View file @
4442a927
...
...
@@ -89,11 +89,10 @@ protected:
void
mouseDoubleClickEvent
(
QMouseEvent
*
ev
)
{
int
line
=
cursorForPosition
(
ev
->
pos
()).
block
().
blockNumber
();
if
(
unsigned
taskid
=
m_taskids
.
value
(
line
,
0
))
{
if
(
unsigned
taskid
=
m_taskids
.
value
(
line
,
0
))
TaskHub
::
showTaskInEditor
(
taskid
);
}
else
{
else
QPlainTextEdit
::
mouseDoubleClickEvent
(
ev
);
}
}
private:
...
...
src/plugins/projectexplorer/projectexplorer.cpp
View file @
4442a927
...
...
@@ -1176,9 +1176,8 @@ void ProjectExplorerPlugin::updateVariable(const QByteArray &variable)
projectFilePath
=
doc
->
filePath
();
if
(
Target
*
target
=
project
->
activeTarget
())
{
kit
=
target
->
kit
();
if
(
BuildConfiguration
*
buildConfiguration
=
target
->
activeBuildConfiguration
())
{
if
(
BuildConfiguration
*
buildConfiguration
=
target
->
activeBuildConfiguration
())
buildConfigurationName
=
buildConfiguration
->
displayName
();
}
}
}
ProjectMacroExpander
expander
(
projectFilePath
,
projectName
,
kit
,
buildConfigurationName
);
...
...
src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
View file @
4442a927
...
...
@@ -591,9 +591,8 @@ QPair<QString, QString> DesktopQmakeRunConfiguration::extractWorkingDirAndExecut
QString
workingDir
;
if
(
!
destDir
.
isEmpty
())
{
bool
workingDirIsBaseDir
=
false
;
if
(
destDir
==
ti
.
buildTarget
)
{
if
(
destDir
==
ti
.
buildTarget
)
workingDirIsBaseDir
=
true
;
}
if
(
QDir
::
isRelativePath
(
destDir
))
destDir
=
QDir
::
cleanPath
(
ti
.
buildDir
+
QLatin1Char
(
'/'
)
+
destDir
);
...
...
src/plugins/qmakeprojectmanager/wizards/abstractmobileapp.cpp
View file @
4442a927
...
...
@@ -156,11 +156,10 @@ QByteArray AbstractMobileApp::generateMainCpp(QString *errorMessage) const
QString
line
;
while
(
!
(
line
=
in
.
readLine
()).
isNull
())
{
bool
adaptLine
=
true
;
if
(
line
.
contains
(
QLatin1String
(
"// DELETE_LINE"
)))
{
if
(
line
.
contains
(
QLatin1String
(
"// DELETE_LINE"
)))
continue
;
// omit this line in the output
}
else
{
else
adaptLine
=
adaptCurrentMainCppTemplateLine
(
line
);
}
if
(
adaptLine
)
{
const
int
commentIndex
=
line
.
indexOf
(
QLatin1String
(
" //"
));
if
(
commentIndex
!=
-
1
)
...
...
src/plugins/qmakeprojectmanager/wizards/librarywizarddialog.cpp
View file @
4442a927
...
...
@@ -146,9 +146,8 @@ LibraryWizardDialog::LibraryWizardDialog(const QString &templateName,
// Use the intro page instead, set up initially
setIntroDescription
(
tr
(
"This wizard generates a C++ library project."
));
if
(
!
parameters
.
extraValues
().
contains
(
QLatin1String
(
ProjectExplorer
::
Constants
::
PROJECT_KIT_IDS
)))
{
if
(
!
parameters
.
extraValues
().
contains
(
QLatin1String
(
ProjectExplorer
::
Constants
::
PROJECT_KIT_IDS
)))
m_targetPageId
=
addTargetSetupPage
();
}
m_modulesPageId
=
addModulesPage
();
...
...
src/plugins/qmldesigner/components/importmanager/importlabel.cpp
View file @
4442a927
...
...
@@ -75,11 +75,10 @@ const Import ImportLabel::import() const
void
ImportLabel
::
setReadOnly
(
bool
readOnly
)
const
{
m_removeButton
->
setDisabled
(
readOnly
);
if
(
readOnly
)
{
if
(
readOnly
)
m_removeButton
->
setIcon
(
QIcon
());
}
else
{
else
m_removeButton
->
setIcon
(
QIcon
(
Core
::
Constants
::
ICON_CLOSE_DOCUMENT
));
}
}
void
ImportLabel
::
emitRemoveImport
()
...
...
src/plugins/qmldesigner/components/integration/designdocument.cpp
View file @
4442a927
...
...
@@ -194,11 +194,10 @@ QString DesignDocument::displayName() const
QString
DesignDocument
::
simplfiedDisplayName
()
const
{
if
(
rootModelNode
().
id
().
isEmpty
())
{
if
(
rootModelNode
().
id
().
isEmpty
())
return
rootModelNode
().
id
();
}
else
{
else
return
rootModelNode
().
simplifiedTypeName
();
}
QStringList
list
=
displayName
().
split
(
QLatin1Char
(
'/'
));
return
list
.
last
();
...
...
@@ -637,9 +636,8 @@ void DesignDocument::redo()
static
bool
isFileInProject
(
DesignDocument
*
designDocument
,
ProjectExplorer
::
Project
*
project
)
{
foreach
(
const
QString
&
fileNameInProject
,
project
->
files
(
ProjectExplorer
::
Project
::
ExcludeGeneratedFiles
))
{
if
(
designDocument
->
fileName
()
==
fileNameInProject
)
{
if
(
designDocument
->
fileName
()
==
fileNameInProject
)
return
true
;
}
}
return
false
;
...
...
src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp
View file @
4442a927
...
...
@@ -75,9 +75,8 @@ QVariant ItemLibrarySortedModel::data(const QModelIndex &index, int role) const
if
(
m_roleNames
.
contains
(
role
))
{
QVariant
value
=
m_privList
.
at
(
index
.
row
())
->
property
(
m_roleNames
.
value
(
role
));
if
(
ItemLibrarySortedModel
*
model
=
qobject_cast
<
ItemLibrarySortedModel
*>
(
value
.
value
<
QObject
*>
()))
{
if
(
ItemLibrarySortedModel
*
model
=
qobject_cast
<
ItemLibrarySortedModel
*>
(
value
.
value
<
QObject
*>
()))
return
QVariant
::
fromValue
(
model
);
}
return
m_privList
.
at
(
index
.
row
())
->
property
(
m_roleNames
.
value
(
role
));
}
...
...
@@ -145,11 +144,10 @@ bool ItemLibrarySortedModel::setElementVisible(int libId, bool visible)
return
false
;