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
4a552ead
Commit
4a552ead
authored
Dec 09, 2008
by
hjk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use QTC_ASSERT instead of Q_ASSERT
parent
e99d8ce3
Changes
94
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
94 changed files
with
905 additions
and
655 deletions
+905
-655
installer/qinstaller.cpp
installer/qinstaller.cpp
+1
-1
shared/designerintegrationv2/formresizer.cpp
shared/designerintegrationv2/formresizer.cpp
+6
-3
shared/indenter/constants.cpp
shared/indenter/constants.cpp
+10
-8
shared/proparser/procommandmanager.cpp
shared/proparser/procommandmanager.cpp
+5
-3
shared/proparser/profileevaluator.cpp
shared/proparser/profileevaluator.cpp
+3
-1
shared/qrceditor/resourcefile.cpp
shared/qrceditor/resourcefile.cpp
+54
-51
shared/qrceditor/resourcefile_p.h
shared/qrceditor/resourcefile_p.h
+7
-5
shared/qrceditor/resourceview.cpp
shared/qrceditor/resourceview.cpp
+17
-13
shared/qrceditor/undocommands.cpp
shared/qrceditor/undocommands.cpp
+7
-7
shared/scriptwrapper/wrap_helpers.h
shared/scriptwrapper/wrap_helpers.h
+4
-2
src/libs/cplusplus/CppDocument.cpp
src/libs/cplusplus/CppDocument.cpp
+4
-1
src/libs/cplusplus/OverviewModel.cpp
src/libs/cplusplus/OverviewModel.cpp
+7
-5
src/libs/cplusplus/ResolveExpression.cpp
src/libs/cplusplus/ResolveExpression.cpp
+15
-13
src/libs/cplusplus/pp-environment.cpp
src/libs/cplusplus/pp-environment.cpp
+14
-7
src/libs/utils/classnamevalidatinglineedit.cpp
src/libs/utils/classnamevalidatinglineedit.cpp
+4
-2
src/libs/utils/filenamevalidatinglineedit.cpp
src/libs/utils/filenamevalidatinglineedit.cpp
+3
-2
src/libs/utils/pathchooser.cpp
src/libs/utils/pathchooser.cpp
+11
-9
src/libs/utils/qtcassert.h
src/libs/utils/qtcassert.h
+2
-0
src/plugins/bookmarks/bookmarkmanager.cpp
src/plugins/bookmarks/bookmarkmanager.cpp
+7
-4
src/plugins/cmakeprojectmanager/cmakeproject.cpp
src/plugins/cmakeprojectmanager/cmakeproject.cpp
+6
-4
src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
+6
-4
src/plugins/cmakeprojectmanager/cmakestep.cpp
src/plugins/cmakeprojectmanager/cmakestep.cpp
+6
-5
src/plugins/cmakeprojectmanager/makestep.cpp
src/plugins/cmakeprojectmanager/makestep.cpp
+4
-4
src/plugins/coreplugin/editormanager/editorgroup.cpp
src/plugins/coreplugin/editormanager/editorgroup.cpp
+12
-8
src/plugins/coreplugin/editormanager/editormanager.cpp
src/plugins/coreplugin/editormanager/editormanager.cpp
+9
-8
src/plugins/coreplugin/editormanager/editorsplitter.cpp
src/plugins/coreplugin/editormanager/editorsplitter.cpp
+15
-12
src/plugins/coreplugin/editormanager/openeditorsview.cpp
src/plugins/coreplugin/editormanager/openeditorsview.cpp
+2
-1
src/plugins/coreplugin/editormanager/stackededitorgroup.cpp
src/plugins/coreplugin/editormanager/stackededitorgroup.cpp
+15
-11
src/plugins/coreplugin/filemanager.cpp
src/plugins/coreplugin/filemanager.cpp
+6
-5
src/plugins/coreplugin/manhattanstyle.cpp
src/plugins/coreplugin/manhattanstyle.cpp
+31
-24
src/plugins/coreplugin/mimedatabase.cpp
src/plugins/coreplugin/mimedatabase.cpp
+10
-7
src/plugins/coreplugin/modemanager.cpp
src/plugins/coreplugin/modemanager.cpp
+6
-1
src/plugins/coreplugin/progressmanager/progressmanager.cpp
src/plugins/coreplugin/progressmanager/progressmanager.cpp
+5
-3
src/plugins/coreplugin/progressmanager/progressview.cpp
src/plugins/coreplugin/progressmanager/progressview.cpp
+3
-1
src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.cpp
src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.cpp
+98
-30
src/plugins/coreplugin/scriptmanager/scriptmanager.cpp
src/plugins/coreplugin/scriptmanager/scriptmanager.cpp
+5
-3
src/plugins/coreplugin/versiondialog.cpp
src/plugins/coreplugin/versiondialog.cpp
+10
-6
src/plugins/cppeditor/cppclasswizard.cpp
src/plugins/cppeditor/cppclasswizard.cpp
+6
-4
src/plugins/cpptools/cppcodecompletion.cpp
src/plugins/cpptools/cppcodecompletion.cpp
+5
-2
src/plugins/cpptools/cppmodelmanager.cpp
src/plugins/cpptools/cppmodelmanager.cpp
+12
-9
src/plugins/debugger/debuggerrunner.cpp
src/plugins/debugger/debuggerrunner.cpp
+5
-4
src/plugins/designer/editorwidget.cpp
src/plugins/designer/editorwidget.cpp
+4
-3
src/plugins/designer/formeditorw.cpp
src/plugins/designer/formeditorw.cpp
+9
-8
src/plugins/find/basetextfind.cpp
src/plugins/find/basetextfind.cpp
+6
-4
src/plugins/find/currentdocumentfind.cpp
src/plugins/find/currentdocumentfind.cpp
+27
-31
src/plugins/find/findplugin.cpp
src/plugins/find/findplugin.cpp
+8
-11
src/plugins/git/gitclient.cpp
src/plugins/git/gitclient.cpp
+19
-18
src/plugins/git/giteditor.cpp
src/plugins/git/giteditor.cpp
+14
-11
src/plugins/git/gitplugin.cpp
src/plugins/git/gitplugin.cpp
+17
-13
src/plugins/help/helpfindsupport.cpp
src/plugins/help/helpfindsupport.cpp
+6
-4
src/plugins/perforce/perforceeditor.cpp
src/plugins/perforce/perforceeditor.cpp
+13
-11
src/plugins/perforce/perforceplugin.cpp
src/plugins/perforce/perforceplugin.cpp
+41
-25
src/plugins/perforce/perforceplugin.h
src/plugins/perforce/perforceplugin.h
+3
-3
src/plugins/perforce/perforcesubmiteditor.cpp
src/plugins/perforce/perforcesubmiteditor.cpp
+3
-1
src/plugins/projectexplorer/allprojectsfind.cpp
src/plugins/projectexplorer/allprojectsfind.cpp
+6
-5
src/plugins/projectexplorer/applicationrunconfiguration.cpp
src/plugins/projectexplorer/applicationrunconfiguration.cpp
+8
-7
src/plugins/projectexplorer/buildmanager.cpp
src/plugins/projectexplorer/buildmanager.cpp
+9
-7
src/plugins/projectexplorer/buildstep.cpp
src/plugins/projectexplorer/buildstep.cpp
+3
-1
src/plugins/projectexplorer/buildstepspage.cpp
src/plugins/projectexplorer/buildstepspage.cpp
+5
-4
src/plugins/projectexplorer/currentprojectfind.cpp
src/plugins/projectexplorer/currentprojectfind.cpp
+5
-4
src/plugins/projectexplorer/project.cpp
src/plugins/projectexplorer/project.cpp
+6
-5
src/plugins/projectexplorer/projectexplorer.cpp
src/plugins/projectexplorer/projectexplorer.cpp
+19
-18
src/plugins/projectexplorer/projectmodels.cpp
src/plugins/projectexplorer/projectmodels.cpp
+26
-23
src/plugins/projectexplorer/projectnodes.cpp
src/plugins/projectexplorer/projectnodes.cpp
+7
-5
src/plugins/projectexplorer/projecttreewidget.cpp
src/plugins/projectexplorer/projecttreewidget.cpp
+5
-2
src/plugins/projectexplorer/runsettingspropertiespage.cpp
src/plugins/projectexplorer/runsettingspropertiespage.cpp
+16
-14
src/plugins/projectexplorer/session.cpp
src/plugins/projectexplorer/session.cpp
+16
-19
src/plugins/qt4projectmanager/gdbmacrosbuildstep.cpp
src/plugins/qt4projectmanager/gdbmacrosbuildstep.cpp
+7
-5
src/plugins/qt4projectmanager/makestep.cpp
src/plugins/qt4projectmanager/makestep.cpp
+7
-5
src/plugins/qt4projectmanager/qmakestep.cpp
src/plugins/qt4projectmanager/qmakestep.cpp
+2
-1
src/plugins/qt4projectmanager/qt4nodes.cpp
src/plugins/qt4projectmanager/qt4nodes.cpp
+8
-5
src/plugins/qt4projectmanager/qt4runconfiguration.cpp
src/plugins/qt4projectmanager/qt4runconfiguration.cpp
+9
-7
src/plugins/qt4projectmanager/qtversionmanager.cpp
src/plugins/qt4projectmanager/qtversionmanager.cpp
+10
-10
src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
...plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
+4
-2
src/plugins/qt4projectmanager/wizards/modulespage.cpp
src/plugins/qt4projectmanager/wizards/modulespage.cpp
+10
-9
src/plugins/qtscripteditor/qtscripteditorplugin.cpp
src/plugins/qtscripteditor/qtscripteditorplugin.cpp
+5
-3
src/plugins/qtscripteditor/qtscripthighlighter.cpp
src/plugins/qtscripteditor/qtscripthighlighter.cpp
+3
-1
src/plugins/quickopen/quickopenmanager.cpp
src/plugins/quickopen/quickopenmanager.cpp
+2
-1
src/plugins/quickopen/quickopentoolwindow.cpp
src/plugins/quickopen/quickopentoolwindow.cpp
+3
-2
src/plugins/quickopen/settingspage.cpp
src/plugins/quickopen/settingspage.cpp
+10
-7
src/plugins/resourceeditor/resourceeditorplugin.cpp
src/plugins/resourceeditor/resourceeditorplugin.cpp
+6
-2
src/plugins/subversion/subversioneditor.cpp
src/plugins/subversion/subversioneditor.cpp
+7
-5
src/plugins/subversion/subversionplugin.cpp
src/plugins/subversion/subversionplugin.cpp
+5
-4
src/plugins/texteditor/basetextdocument.cpp
src/plugins/texteditor/basetextdocument.cpp
+5
-5
src/plugins/texteditor/basetexteditor.cpp
src/plugins/texteditor/basetexteditor.cpp
+16
-15
src/plugins/texteditor/completionsupport.cpp
src/plugins/texteditor/completionsupport.cpp
+2
-1
src/plugins/texteditor/completionwidget.cpp
src/plugins/texteditor/completionwidget.cpp
+2
-1
src/plugins/texteditor/fontsettings.cpp
src/plugins/texteditor/fontsettings.cpp
+6
-2
src/plugins/texteditor/texteditoractionhandler.cpp
src/plugins/texteditor/texteditoractionhandler.cpp
+2
-1
src/plugins/texteditor/texteditorplugin.cpp
src/plugins/texteditor/texteditorplugin.cpp
+2
-1
src/plugins/texteditor/texteditorsettings.cpp
src/plugins/texteditor/texteditorsettings.cpp
+3
-1
src/plugins/vcsbase/diffhighlighter.cpp
src/plugins/vcsbase/diffhighlighter.cpp
+3
-1
src/tools/makespy/main.cpp
src/tools/makespy/main.cpp
+0
-1
tests/manual/cplusplus/main.cpp
tests/manual/cplusplus/main.cpp
+7
-7
No files found.
installer/qinstaller.cpp
View file @
4a552ead
...
...
@@ -239,7 +239,7 @@ static void appendFileData(QIODevice *out, const QString &fileName)
static
void
appendFileData
(
QIODevice
*
out
,
QIODevice
*
in
)
{
Q
_ASSERT
(
!
in
->
isSequential
()
);
Q
TC_ASSERT
(
!
in
->
isSequential
(),
return
);
qint64
size
=
in
->
size
();
QByteArray
&
b
=
theBuffer
(
size
);
rawRead
(
in
,
b
.
data
(),
size
);
...
...
shared/designerintegrationv2/formresizer.cpp
View file @
4a552ead
...
...
@@ -30,19 +30,22 @@
** version 1.2, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include "formresizer.h"
#include "sizehandlerect.h"
#include "widgethostconstants.h"
#include <utils/qtcassert.h>
#include <QtDesigner/QDesignerFormWindowInterface>
#include <QtGui/QResizeEvent>
#include <QtGui/QPalette>
#include <QtGui/QLayout>
#include <QtGui/QFrame>
#include <QtGui/QResizeEvent>
#include <QtCore/QDebug>
enum
{
debugFormResizer
=
0
};
enum
{
debugFormResizer
=
0
};
using
namespace
SharedTools
::
Internal
;
...
...
@@ -140,7 +143,7 @@ void FormResizer::setFormWindow(QDesignerFormWindowInterface *fw)
if
(
debugFormResizer
)
qDebug
()
<<
"FormResizer::setFormWindow "
<<
fw
;
QVBoxLayout
*
layout
=
qobject_cast
<
QVBoxLayout
*>
(
m_frame
->
layout
());
Q
_ASSERT
(
layout
);
Q
TC_ASSERT
(
layout
,
return
);
if
(
layout
->
count
())
delete
layout
->
takeAt
(
0
);
m_formWindow
=
fw
;
...
...
shared/indenter/constants.cpp
View file @
4a552ead
...
...
@@ -33,6 +33,8 @@
#include "indenter.h"
#include <utils/qtcassert.h>
using
namespace
SharedTools
::
IndenterInternal
;
// --- Constants
...
...
@@ -55,12 +57,12 @@ Constants::Constants() :
"|(?:public|protected|private|signals|Q_SIGNALS|default)(?:
\\
s+slots|
\\
s+Q_SLOTS)?
\\
s*"
")?:.*"
))
{
m_literal
.
setMinimal
(
true
);
m_inlineCComment
.
setMinimal
(
true
);
Q
_ASSERT
(
m_literal
.
isValid
()
);
Q
_ASSERT
(
m_label
.
isValid
()
);
Q
_ASSERT
(
m_inlineCComment
.
isValid
()
);
Q
_ASSERT
(
m_braceX
.
isValid
()
);
Q
_ASSERT
(
m_iflikeKeyword
.
isValid
()
);
Q
_ASSERT
(
m_caseLabel
.
isValid
()
);
m_literal
.
setMinimal
(
true
);
m_inlineCComment
.
setMinimal
(
true
);
Q
TC_ASSERT
(
m_literal
.
isValid
(),
return
);
Q
TC_ASSERT
(
m_label
.
isValid
(),
return
);
Q
TC_ASSERT
(
m_inlineCComment
.
isValid
(),
return
);
Q
TC_ASSERT
(
m_braceX
.
isValid
(),
return
);
Q
TC_ASSERT
(
m_iflikeKeyword
.
isValid
(),
return
);
Q
TC_ASSERT
(
m_caseLabel
.
isValid
(),
return
);
}
shared/proparser/procommandmanager.cpp
View file @
4a552ead
...
...
@@ -33,6 +33,8 @@
#include "procommandmanager.h"
#include <utils/qtcassert.h>
using
namespace
Qt4ProjectManager
::
Internal
;
ProCommandGroup
::
ProCommandGroup
(
const
QString
&
name
)
...
...
@@ -76,7 +78,7 @@ ProCommandManager::~ProCommandManager()
void
ProCommandManager
::
beginGroup
(
const
QString
&
name
)
{
Q
_ASSERT
(
!
m_group
);
Q
TC_ASSERT
(
!
m_group
,
return
);
if
(
m_pos
!=
m_groups
.
count
())
{
int
removecount
=
m_groups
.
count
()
-
m_pos
;
...
...
@@ -95,7 +97,7 @@ bool ProCommandManager::hasGroup() const
void
ProCommandManager
::
endGroup
()
{
Q
_ASSERT
(
m_group
);
Q
TC_ASSERT
(
m_group
,
return
);
m_groups
.
append
(
m_group
);
m_pos
=
m_groups
.
count
();
...
...
@@ -106,7 +108,7 @@ void ProCommandManager::endGroup()
bool
ProCommandManager
::
command
(
ProCommand
*
cmd
)
{
Q
_ASSERT
(
m_group
);
Q
TC_ASSERT
(
m_group
,
return
false
);
if
(
cmd
->
redo
())
{
m_group
->
appendCommand
(
cmd
);
...
...
shared/proparser/profileevaluator.cpp
View file @
4a552ead
...
...
@@ -35,6 +35,8 @@
#include "proparserutils.h"
#include "proitems.h"
#include <utils/qtcassert.h>
#include <QtCore/QByteArray>
#include <QtCore/QDebug>
#include <QtCore/QDir>
...
...
@@ -683,7 +685,7 @@ bool ProFileEvaluator::Private::visitProFunction(ProFunction *func)
QString
text
=
func
->
text
();
int
lparen
=
text
.
indexOf
(
QLatin1Char
(
'('
));
int
rparen
=
text
.
lastIndexOf
(
QLatin1Char
(
')'
));
Q
_ASSERT
(
lparen
<
rparen
);
Q
TC_ASSERT
(
lparen
<
rparen
,
return
false
);
QString
arguments
=
text
.
mid
(
lparen
+
1
,
rparen
-
lparen
-
1
);
QString
funcName
=
text
.
left
(
lparen
);
...
...
shared/qrceditor/resourcefile.cpp
View file @
4a552ead
This diff is collapsed.
Click to expand it.
shared/qrceditor/resourcefile_p.h
View file @
4a552ead
...
...
@@ -36,10 +36,12 @@
#include "namespace_global.h"
#include <utils/qtcassert.h>
#include <QtCore/QAbstractItemModel>
#include <QtCore/QMap>
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtCore/QMap>
#include <QtCore/QAbstractItemModel>
#include "shared_global_p.h"
...
...
@@ -66,11 +68,11 @@ class Node
protected:
Node
(
File
*
file
,
Prefix
*
prefix
)
:
m_file
(
file
),
m_prefix
(
prefix
)
{
Q
_ASSERT
(
m_prefix
!=
NULL
);
Q
TC_ASSERT
(
m_prefix
,
return
);
}
public:
File
*
file
()
{
return
m_file
;
}
Prefix
*
prefix
()
{
Q_ASSERT
(
m_prefix
!=
NULL
);
return
m_prefix
;
}
File
*
file
()
{
return
m_file
;
}
Prefix
*
prefix
()
{
return
m_prefix
;
}
private:
File
*
m_file
;
Prefix
*
m_prefix
;
...
...
shared/qrceditor/resourceview.cpp
View file @
4a552ead
...
...
@@ -32,16 +32,20 @@
***************************************************************************/
#include "resourceview.h"
#include "undocommands_p.h"
#include <QtGui/QHeaderView>
#include <QtGui/QMenu>
#include <utils/qtcassert.h>
#include <QtCore/QDebug>
#include <QtGui/QAction>
#include <QtGui/QMouseEvent>
#include <QtGui/QApplication>
#include <QtGui/QInputDialog>
#include <QtGui/QFileDialog>
#include <QtCore/QtDebug>
#include <QtGui/QHeaderView>
#include <QtGui/QInputDialog>
#include <QtGui/QMenu>
#include <QtGui/QMouseEvent>
#include <QtGui/QUndoStack>
namespace
SharedTools
{
...
...
@@ -308,14 +312,14 @@ void ResourceView::findSamePlacePostDeletionModelIndex(int &row, QModelIndex &pa
EntryBackup
*
ResourceView
::
removeEntry
(
const
QModelIndex
&
index
)
{
Q
_ASSERT
(
m_qrcModel
!=
NULL
);
Q
TC_ASSERT
(
m_qrcModel
,
return
0
);
return
m_qrcModel
->
removeEntry
(
index
);
}
void
ResourceView
::
addFiles
(
int
prefixIndex
,
const
QStringList
&
fileNames
,
int
cursorFile
,
int
&
firstFile
,
int
&
lastFile
)
{
Q
_ASSERT
(
m_qrcModel
!=
NULL
);
Q
TC_ASSERT
(
m_qrcModel
,
return
);
m_qrcModel
->
addFiles
(
prefixIndex
,
fileNames
,
cursorFile
,
firstFile
,
lastFile
);
// Expand prefix node
...
...
@@ -327,11 +331,11 @@ void ResourceView::addFiles(int prefixIndex, const QStringList &fileNames, int c
void
ResourceView
::
removeFiles
(
int
prefixIndex
,
int
firstFileIndex
,
int
lastFileIndex
)
{
Q
_ASSERT
((
prefixIndex
>=
0
)
&&
(
prefixIndex
<
m_qrcModel
->
rowCount
(
QModelIndex
()))
);
Q
TC_ASSERT
(
prefixIndex
>=
0
&&
prefixIndex
<
m_qrcModel
->
rowCount
(
QModelIndex
()),
return
);
const
QModelIndex
prefixModelIndex
=
m_qrcModel
->
index
(
prefixIndex
,
0
,
QModelIndex
());
Q
_ASSERT
(
prefixModelIndex
!=
QModelIndex
()
);
Q
_ASSERT
((
firstFileIndex
>=
0
)
&&
(
firstFileIndex
<
m_qrcModel
->
rowCount
(
prefixModelIndex
))
);
Q
_ASSERT
((
lastFileIndex
>=
0
)
&&
(
lastFileIndex
<
m_qrcModel
->
rowCount
(
prefixModelIndex
))
);
Q
TC_ASSERT
(
prefixModelIndex
!=
QModelIndex
(),
return
);
Q
TC_ASSERT
(
firstFileIndex
>=
0
&&
firstFileIndex
<
m_qrcModel
->
rowCount
(
prefixModelIndex
),
return
);
Q
TC_ASSERT
(
lastFileIndex
>=
0
&&
lastFileIndex
<
m_qrcModel
->
rowCount
(
prefixModelIndex
),
return
);
for
(
int
i
=
lastFileIndex
;
i
>=
firstFileIndex
;
i
--
)
{
const
QModelIndex
index
=
m_qrcModel
->
index
(
i
,
0
,
prefixModelIndex
);
...
...
@@ -568,7 +572,7 @@ QString ResourceView::getCurrentValue(NodeProperty property) const
case
AliasProperty
:
return
currentAlias
();
case
PrefixProperty
:
return
currentPrefix
();
case
LanguageProperty
:
return
currentLanguage
();
default:
Q
_ASSERT
(
false
);
return
QString
();
// Kill warning
default:
Q
TC_ASSERT
(
false
,
/**/
);
return
QString
();
// Kill warning
}
}
...
...
@@ -579,7 +583,7 @@ void ResourceView::changeValue(const QModelIndex &nodeIndex, NodeProperty proper
case
AliasProperty
:
m_qrcModel
->
changeAlias
(
nodeIndex
,
value
);
return
;
case
PrefixProperty
:
m_qrcModel
->
changePrefix
(
nodeIndex
,
value
);
return
;
case
LanguageProperty
:
m_qrcModel
->
changeLang
(
nodeIndex
,
value
);
return
;
default:
Q
_ASSERT
(
false
);
default:
Q
TC_ASSERT
(
false
,
/**/
);
}
}
...
...
shared/qrceditor/undocommands.cpp
View file @
4a552ead
...
...
@@ -92,7 +92,7 @@ bool ModifyPropertyCommand::mergeWith(const QUndoCommand * command)
{
const
ModifyPropertyCommand
*
const
brother
=
dynamic_cast
<
const
ModifyPropertyCommand
*>
(
command
);
if
(
command
==
NULL
||
m_property
!=
brother
->
m_property
)
if
(
command
==
0
||
m_property
!=
brother
->
m_property
)
return
false
;
// Choose older command (this) and forgot the other
...
...
@@ -101,7 +101,7 @@ bool ModifyPropertyCommand::mergeWith(const QUndoCommand * command)
void
ModifyPropertyCommand
::
undo
()
{
Q
_ASSERT
(
m_view
!=
NULL
);
Q
TC_ASSERT
(
m_view
,
return
);
// Save current text in m_after for redo()
m_after
=
m_view
->
getCurrentValue
(
m_property
);
...
...
@@ -117,12 +117,12 @@ void ModifyPropertyCommand::redo()
return
;
// Bring back text before undo
Q
_ASSERT
(
m_view
!=
NULL
);
Q
TC_ASSERT
(
m_view
,
return
);
m_view
->
changeValue
(
makeIndex
(),
m_property
,
m_after
);
}
RemoveEntryCommand
::
RemoveEntryCommand
(
ResourceView
*
view
,
const
QModelIndex
&
index
)
:
ModelIndexViewCommand
(
view
),
m_entry
(
NULL
),
m_isExpanded
(
true
)
:
ModelIndexViewCommand
(
view
),
m_entry
(
0
),
m_isExpanded
(
true
)
{
storeIndex
(
index
);
}
...
...
@@ -142,9 +142,9 @@ void RemoveEntryCommand::redo()
void
RemoveEntryCommand
::
undo
()
{
if
(
m_entry
!=
NULL
)
{
if
(
m_entry
==
0
)
{
m_entry
->
restore
();
Q
_ASSERT
(
m_view
!=
NULL
);
Q
TC_ASSERT
(
m_view
!=
0
,
return
);
const
QModelIndex
index
=
makeIndex
();
m_view
->
setExpanded
(
index
,
m_isExpanded
);
m_view
->
setCurrentIndex
(
index
);
...
...
@@ -155,7 +155,7 @@ void RemoveEntryCommand::undo()
void
RemoveEntryCommand
::
freeEntry
()
{
delete
m_entry
;
m_entry
=
NULL
;
m_entry
=
0
;
}
AddFilesCommand
::
AddFilesCommand
(
ResourceView
*
view
,
int
prefixIndex
,
int
cursorFileIndex
,
...
...
shared/scriptwrapper/wrap_helpers.h
View file @
4a552ead
...
...
@@ -34,6 +34,8 @@
#ifndef WRAP_HELPERS_H
#define WRAP_HELPERS_H
#include <utils/qtcassert.h>
#include <QtScript/QScriptEngine>
#include <QtScript/QScriptContext>
#include <QtScript/QScriptValue>
...
...
@@ -87,7 +89,7 @@ template <class Wrapper, class Wrapped>
Wrapped
*
(
Wrapper
::*
wrappedAccessor
)
()
const
)
{
Wrapped
*
wrapped
=
wrappedFromScriptValue
(
context
->
thisObject
(),
wrappedAccessor
);
Q
_ASSERT
(
wrapped
);
Q
TC_ASSERT
(
wrapped
,
return
0
);
return
wrapped
;
}
...
...
@@ -314,7 +316,7 @@ static void scriptValueToQObject(const QScriptValue &sv, SomeQObject * &p)
{
QObject
*
qObject
=
sv
.
toQObject
();
p
=
qobject_cast
<
SomeQObject
*>
(
qObject
);
Q
_ASSERT
(
p
);
Q
TC_ASSERT
(
p
,
return
);
}
// Register a QObject-derived class which has Q_DECLARE_METATYPE(Ptr*)
...
...
src/libs/cplusplus/CppDocument.cpp
View file @
4a552ead
...
...
@@ -32,6 +32,9 @@
***************************************************************************/
#include "CppDocument.h"
#include <utils/qtcassert.h>
#include <Control.h>
#include <TranslationUnit.h>
#include <DiagnosticClient.h>
...
...
@@ -270,7 +273,7 @@ bool Document::parse(ParseMode mode)
void
Document
::
check
()
{
Q
_ASSERT
(
!
_globalNamespace
);
Q
TC_ASSERT
(
!
_globalNamespace
,
return
);
Semantic
semantic
(
_control
);
...
...
src/libs/cplusplus/OverviewModel.cpp
View file @
4a552ead
...
...
@@ -34,6 +34,8 @@
#include "OverviewModel.h"
#include "Overview.h"
#include <utils/qtcassert.h>
#include <Scope.h>
#include <Semantic.h>
#include <Literals.h>
...
...
@@ -81,13 +83,13 @@ QModelIndex OverviewModel::index(int row, int column, const QModelIndex &parent)
return
createIndex
(
row
,
column
,
symbol
);
}
else
{
Symbol
*
parentSymbol
=
static_cast
<
Symbol
*>
(
parent
.
internalPointer
());
Q
_ASSERT
(
parentSymbol
!=
0
);
Q
TC_ASSERT
(
parentSymbol
,
return
QModelIndex
()
);
ScopedSymbol
*
scopedSymbol
=
parentSymbol
->
asScopedSymbol
();
Q
_ASSERT
(
scopedSymbol
!=
0
);
Q
TC_ASSERT
(
scopedSymbol
,
return
QModelIndex
()
);
Scope
*
scope
=
scopedSymbol
->
members
();
Q
_ASSERT
(
scope
!=
0
);
Q
TC_ASSERT
(
scope
,
return
QModelIndex
()
);
return
createIndex
(
row
,
0
,
scope
->
symbolAt
(
row
));
}
...
...
@@ -124,12 +126,12 @@ int OverviewModel::rowCount(const QModelIndex &parent) const
if
(
!
parent
.
parent
().
isValid
()
&&
parent
.
row
()
==
0
)
// account for no symbol item
return
0
;
Symbol
*
parentSymbol
=
static_cast
<
Symbol
*>
(
parent
.
internalPointer
());
Q
_ASSERT
(
parentSymbol
!=
0
);
Q
TC_ASSERT
(
parentSymbol
,
return
0
);
if
(
ScopedSymbol
*
scopedSymbol
=
parentSymbol
->
asScopedSymbol
())
{
if
(
!
scopedSymbol
->
isFunction
())
{
Scope
*
parentScope
=
scopedSymbol
->
members
();
Q
_ASSERT
(
parentScope
!=
0
);
Q
TC_ASSERT
(
parentScope
,
return
0
);
return
parentScope
->
symbolCount
();
}
...
...
src/libs/cplusplus/ResolveExpression.cpp
View file @
4a552ead
...
...
@@ -45,12 +45,14 @@
#include <TypeVisitor.h>
#include <NameVisitor.h>
#include <QList>
#include <QtDebug>
#include <utils/qtcassert.h>
#include <QtCore/QList>
#include <QtCore/QtDebug>
using
namespace
CPlusPlus
;
namespace
{
namespace
{
typedef
QList
<
QPair
<
Name
*
,
FullySpecifiedType
>
>
Substitution
;
...
...
@@ -98,7 +100,7 @@ protected:
// types
virtual
void
visit
(
PointerToMemberType
*
/*ty*/
)
{
Q
_ASSERT
(
0
);
Q
TC_ASSERT
(
false
,
/**/
);
}
virtual
void
visit
(
PointerType
*
ty
)
...
...
@@ -150,32 +152,32 @@ protected:
{
/* nothing to do*/
}
virtual
void
visit
(
Namespace
*
)
{
Q
_ASSERT
(
0
);
}
{
Q
TC_ASSERT
(
false
,
/**/
);
}
virtual
void
visit
(
Class
*
)
{
Q
_ASSERT
(
0
);
}
{
Q
TC_ASSERT
(
false
,
/**/
);
}
virtual
void
visit
(
Enum
*
)
{
Q
_ASSERT
(
0
);
}
{
Q
TC_ASSERT
(
false
,
/**/
);
}
// names
virtual
void
visit
(
NameId
*
)
{
Q
_ASSERT
(
0
);
}
{
Q
TC_ASSERT
(
false
,
/**/
);
}
virtual
void
visit
(
TemplateNameId
*
)
{
Q
_ASSERT
(
0
);
}
{
Q
TC_ASSERT
(
false
,
/**/
);
}
virtual
void
visit
(
DestructorNameId
*
)
{
Q
_ASSERT
(
0
);
}
{
Q
TC_ASSERT
(
false
,
/**/
);
}
virtual
void
visit
(
OperatorNameId
*
)
{
Q
_ASSERT
(
0
);
}
{
Q
TC_ASSERT
(
false
,
/**/
);
}
virtual
void
visit
(
ConversionNameId
*
)
{
Q
_ASSERT
(
0
);
}
{
Q
TC_ASSERT
(
false
,
/**/
);
}
virtual
void
visit
(
QualifiedNameId
*
)
{
Q
_ASSERT
(
0
);
}
{
Q
TC_ASSERT
(
false
,
/**/
);
}
};
}
// end of anonymous namespace
...
...
src/libs/cplusplus/pp-environment.cpp
View file @
4a552ead
...
...
@@ -52,11 +52,14 @@
#include "pp-environment.h"
#include "pp.h"
#include <utils/qtcassert.h>
#include <cstring>
using
namespace
CPlusPlus
;
Environment
::
Environment
()
Environment
::
Environment
()
:
currentLine
(
0
),
hide_next
(
false
),
_macros
(
0
),
...
...
@@ -67,7 +70,7 @@ Environment::Environment ()
{
}
Environment
::~
Environment
()
Environment
::~
Environment
()
{
if
(
_macros
)
{
qDeleteAll
(
firstMacro
(),
lastMacro
());
...
...
@@ -78,15 +81,19 @@ Environment::~Environment ()
free
(
_hash
);
}
unsigned
Environment
::
macroCount
()
const
{
return
_macro_count
+
1
;
}
unsigned
Environment
::
macroCount
()
const
{
return
_macro_count
+
1
;
}
Macro
*
Environment
::
macroAt
(
unsigned
index
)
const
{
return
_macros
[
index
];
}
Macro
*
Environment
::
macroAt
(
unsigned
index
)
const
{
return
_macros
[
index
];
}
Macro
*
Environment
::
bind
(
const
Macro
&
__macro
)
{
Q
_ASSERT
(
!
__macro
.
name
.
isEmpty
()
);
Q
TC_ASSERT
(
!
__macro
.
name
.
isEmpty
(),
return
0
);
Macro
*
m
=
new
Macro
(
__macro
);
m
->
hashcode
=
hash_code
(
m
->
name
);
...
...
src/libs/utils/classnamevalidatinglineedit.cpp
View file @
4a552ead
...
...
@@ -33,6 +33,8 @@
#include "classnamevalidatinglineedit.h"
#include <utils/qtcassert.h>
#include <QtCore/QDebug>
#include <QtCore/QRegExp>
...
...
@@ -53,7 +55,7 @@ ClassNameValidatingLineEditPrivate:: ClassNameValidatingLineEditPrivate() :
m_namespaceDelimiter
(
QLatin1String
(
"::"
)),
m_namespacesEnabled
(
false
)
{
Q
_ASSERT
(
m_nameRegexp
.
isValid
()
);
Q
TC_ASSERT
(
m_nameRegexp
.
isValid
(),
return
);
}
// --------------------- ClassNameValidatingLineEdit
...
...
@@ -113,7 +115,7 @@ QString ClassNameValidatingLineEdit::createClassName(const QString &name)
// Remove spaces and convert the adjacent characters to uppercase
QString
className
=
name
;
QRegExp
spaceMatcher
(
QLatin1String
(
" +(
\\
w)"
),
Qt
::
CaseSensitive
,
QRegExp
::
RegExp2
);
Q
_ASSERT
(
spaceMatcher
.
isValid
()
);
Q
TC_ASSERT
(
spaceMatcher
.
isValid
(),
/**/
);
int
pos
;
while
((
pos
=
spaceMatcher
.
indexIn
(
className
))
!=
-
1
)
{
className
.
replace
(
pos
,
spaceMatcher
.
matchedLength
(),
...
...
src/libs/utils/filenamevalidatinglineedit.cpp
View file @
4a552ead
...
...
@@ -32,6 +32,7 @@
***************************************************************************/
#include "filenamevalidatinglineedit.h"
#include "qtcassert.h"
#include <QtCore/QRegExp>
#include <QtCore/QDebug>
...
...
@@ -46,7 +47,7 @@ static const QRegExp &windowsDeviceNoSubDirPattern()
{
static
const
QRegExp
rc
(
QLatin1String
(
"CON|AUX|PRN|COM1|COM2|LPT1|LPT2|NUL"
),
Qt
::
CaseInsensitive
);
Q
_ASSERT
(
rc
.
isValid
()
);
Q
TC_ASSERT
(
rc
.
isValid
(),
return
rc
);
return
rc
;
}
...
...
@@ -54,7 +55,7 @@ static const QRegExp &windowsDeviceSubDirPattern()
{
static
const
QRegExp
rc
(
QLatin1String
(
".*[/
\\\\
]CON|.*[/
\\\\
]AUX|.*[/
\\\\
]PRN|.*[/
\\\\
]COM1|.*[/
\\\\
]COM2|.*[/
\\\\
]LPT1|.*[/
\\\\
]LPT2|.*[/
\\\\
]NUL"
),
Qt
::
CaseInsensitive
);
Q
_ASSERT
(
rc
.
isValid
()
);
Q
TC_ASSERT
(
rc
.
isValid
(),
return
rc
);
return
rc
;
}
...
...
src/libs/utils/pathchooser.cpp
View file @
4a552ead
...
...
@@ -32,18 +32,20 @@
***************************************************************************/
#include "pathchooser.h"
#include "basevalidatinglineedit.h"
#include <QtGui/QLineEdit>
#include <QtGui/QHBoxLayout>
#include <QtGui/QToolButton>
#include <QtGui/QFileDialog>
#include <QtGui/QDesktopServices>
#include "basevalidatinglineedit.h"
#include "qtcassert.h"
#include <QtCore/Q
FileInfo
>
#include <QtCore/Q
Debug
>
#include <QtCore/QDir>
#include <QtCore/QFileInfo>
#include <QtCore/QSettings>
#include <QtCore/QDebug>
#include <QtGui/QDesktopServices>
#include <QtGui/QFileDialog>
#include <QtGui/QHBoxLayout>
#include <QtGui/QLineEdit>
#include <QtGui/QToolButton>
namespace
Core
{
namespace
Utils
{
...
...
@@ -71,7 +73,7 @@ PathValidatingLineEdit::PathValidatingLineEdit(PathChooser *chooser, QWidget *pa
BaseValidatingLineEdit
(
parent
),
m_chooser
(
chooser
)
{
Q
_ASSERT
(
chooser
!=
NULL
);
Q
TC_ASSERT
(
chooser
,
return
);
}
bool
PathValidatingLineEdit
::
validate
(
const
QString
&
value
,
QString
*
errorMessage
)
const
...
...
src/libs/utils/qtcassert.h
View file @
4a552ead
...
...
@@ -34,6 +34,8 @@
#ifndef QTC_ASSERT_H
#define QTC_ASSERT_H
#include <QtCore/QDebug>
#ifdef Q_OS_UNIX
#define QTC_ASSERT(cond, action) \
if(cond){}else{qDebug()<<"ASSERTION"<<#cond<<"FAILED"<<__FILE__<<__LINE__;action;}
...
...
src/plugins/bookmarks/bookmarkmanager.cpp
View file @
4a552ead
...
...
@@ -32,6 +32,7 @@
***************************************************************************/
#include "bookmarkmanager.h"
#include "bookmark.h"
#include "bookmarksplugin.h"