Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
a6ca3486
Commit
a6ca3486
authored
Jan 29, 2010
by
Oswald Buddenhagen
Browse files
remove trailing whitespace
doing it in 1.3 as well to avoid possible later conflicts
parent
07da7ccf
Changes
217
Hide whitespace changes
Inline
Side-by-side
doc/addressbook-sdk.qdoc
View file @
a6ca3486
...
...
@@ -215,8 +215,8 @@
\snippet examples/addressbook-sdk/part1/main.cpp main function
The code constructs a new \c AddressBook widget on the stack and
invokes its \l{QWidget::}{show()} function to display it.
The code constructs a new \c AddressBook widget on the stack and
invokes its \l{QWidget::}{show()} function to display it.
However, the widget will not be shown until the application's event
loop is started. This is done by calling the application's
\l{QApplication::}{exec()} function. Finally, the result returned by
...
...
doc/coding-style.qdoc
View file @
a6ca3486
...
...
@@ -32,8 +32,8 @@ that you:
the case that you have better ideas, discuss them with other developers
before writing the code.
\o Take advantage of Qt. Don't re-invent the wheel. Think about what parts
of your code are generic enough that they might be incorporated into
Qt proper.
of your code are generic enough that they might be incorporated into
Qt proper.
\o Document interfaces. Right now we use qdoc, but changing to doxygen
is being considered.
\endlist
...
...
@@ -108,7 +108,7 @@ in C++.
\endcode
\o Using Qt's foreach is ok in non-time critical code when using a QTL
\o Using Qt's foreach is ok in non-time critical code when using a QTL
container. It is a nice way to keep line noise down and to give the
loop variable a proper name:
...
...
@@ -122,14 +122,14 @@ in C++.
for (Container::iterator it = container.begin(); it != end; ++it)
doSomething(*it);
\endcode
If the loop variable can be made const, do so. This can prevent
If the loop variable can be made const, do so. This can prevent
unnecessary detaching of shared data in some cases. So:
\code
foreach (const QString &name, someListOfNames)
doSomething(name);
- NOT -
foreach (QString name, someListOfNames)
...
...
@@ -157,7 +157,7 @@ Only one declaration on each line.
-NOT-
QString a = "Joe", b = "Foo"; // not used in Qt Creator
\endcode
[Note that 'QString a = "Joe"' is formally calling a copy constructor
[Note that 'QString a = "Joe"' is formally calling a copy constructor
on a temporary constructed from a string literal and therefore has the
potential of being more expensive then direct construction by
'QString a("joe")'. However the compiler is allowed to elide the copy
...
...
@@ -166,7 +166,7 @@ Only one declaration on each line.
line with the traditional C-style initialization, _and_ cannot be
mistaken as function declaration, _and_ reduces the level of nested
parantheses in more initializations.]
\section2 Pointers and references
...
...
@@ -439,7 +439,7 @@ Line breaks
\section2 File headers
If you create a new file, the top of the file should include a
If you create a new file, the top of the file should include a
header comment equal to the one found in other source files of Qt Creator.
\section2 Include order
...
...
@@ -474,7 +474,7 @@ Line breaks
You document for the other developers, not for yourself.
In the header you should document interfaces, i.e. what the function does,
not the implementation.
In the .cpp files you document the implementation if the implementation
In the .cpp files you document the implementation if the implementation
in non-obvious.
...
...
scripts/snapshots/cleanup_snapshots.sh
View file @
a6ca3486
...
...
@@ -83,5 +83,5 @@ exit 0
## Properly close subshell
)
)
exit
$?
scripts/snapshots/create_nullbyte_snapshots.sh
View file @
a6ca3486
...
...
@@ -54,5 +54,5 @@ exit 0
## Properly close subshell
)
)
exit
$?
share/qtcreator/gdbmacros/gdbmacros.cpp
View file @
a6ca3486
...
...
@@ -1075,7 +1075,7 @@ static void qDumpQAbstractItem(QDumper &d)
{
ModelIndex
*
mm
=
reinterpret_cast
<
ModelIndex
*>
(
&
mi
);
mm
->
r
=
mm
->
c
=
0
;
mm
->
p
=
mm
->
m
=
0
;
mm
->
p
=
mm
->
m
=
0
;
static
const
char
*
printFormat
=
sizeof
(
void
*
)
==
sizeof
(
long
)
?
"%d,%d,0x%lx,0x%lx"
:
"%d,%d,0x%llx,0x%llx"
;
sscanf
(
d
.
templateParameters
[
0
],
printFormat
,
&
mm
->
r
,
&
mm
->
c
,
&
mm
->
p
,
&
mm
->
m
);
...
...
@@ -2147,7 +2147,7 @@ static void qDumpQVariantHelper(const QVariant *v, QString *value,
case
QVariant
::
KeySequence
:
#ifndef QT_NO_SHORTCUT
*
value
=
qvariant_cast
<
QKeySequence
>
(
*
v
).
toString
();
#else
#else
*
value
=
QString
::
fromLatin1
(
"Disabled by QT_NO_SHORTCUT"
);
#endif
break
;
...
...
@@ -2800,7 +2800,7 @@ static void qDumpQSharedPointer(QDumper &d)
const
QSharedPointer
<
int
>
&
ptr
=
*
reinterpret_cast
<
const
QSharedPointer
<
int
>
*>
(
d
.
data
);
if
(
ptr
.
isNull
())
{
if
(
ptr
.
isNull
())
{
d
.
putItem
(
"value"
,
"<null>"
);
d
.
putItem
(
"valueeditable"
,
"false"
);
d
.
putItem
(
"numchild"
,
0
);
...
...
@@ -3743,9 +3743,9 @@ static inline void dumpSizes(QDumper &d)
const
SizeMap
::
const_iterator
cend
=
sizeMap
.
constEnd
();
for
(
SizeMap
::
const_iterator
it
=
sizeMap
.
constBegin
();
it
!=
cend
;
++
it
)
{
// new size list
if
(
it
.
key
()
!=
lastSize
)
{
if
(
it
.
key
()
!=
lastSize
)
{
if
(
lastSize
)
d
.
put
(
"],"
);
d
.
put
(
"],"
);
d
.
put
(
"[
\"
"
);
d
.
put
(
it
.
key
());
lastSize
=
it
.
key
();
...
...
@@ -3755,7 +3755,7 @@ static inline void dumpSizes(QDumper &d)
d
.
put
(
it
.
value
());
d
.
put
(
'"'
);
}
d
.
put
(
"]]"
);
d
.
put
(
"]]"
);
}
extern
"C"
Q_DECL_EXPORT
...
...
share/qtcreator/gdbmacros/gdbmacros.pro
View file @
a6ca3486
TEMPLATE
=
lib
CONFIG
+=
shared
linux
-*
{
linux
-*
{
CONFIG
-=
release
CONFIG
+=
debug
}
SOURCES
=
gdbmacros
.
cpp
false
{
false
{
DEFINES
+=
USE_QT_GUI
=
0
QT
=
core
}
else
{
else
{
DEFINES
+=
USE_QT_GUI
=
1
QT
=
core
\
gui
...
...
share/qtcreator/gdbmacros/test/main.cpp
View file @
a6ca3486
...
...
@@ -245,7 +245,7 @@ static int dumpQMapQStringString()
test
.
insert
(
QLatin1String
(
"42s"
),
QLatin1String
(
"fortytwo"
));
test
.
insert
(
QLatin1String
(
"423"
),
QLatin1String
(
"fortytree"
));
}
prepareInBuffer
(
"QMap"
,
"local.qmapqstringqstring"
,
"local.qmapqstringqstring"
,
"QString@QString"
);
prepareInBuffer
(
"QMap"
,
"local.qmapqstringqstring"
,
"local.qmapqstringqstring"
,
"QString@QString"
);
qDumpObjectData440
(
2
,
42
,
testAddress
(
&
test
),
1
,
sizeof
(
QString
),
sizeof
(
QString
),
sizeof
(
mapNode
),
valueOffset
);
fputs
(
qDumpOutBuffer
,
stdout
);
fputc
(
'\n'
,
stdout
);
...
...
@@ -451,7 +451,7 @@ static int dumpStdQStringSet()
static
int
dumpStdMapIntString
()
{
std
::
map
<
int
,
std
::
string
>
test
;
std
::
map
<
int
,
std
::
string
>
test
;
std
::
map
<
int
,
std
::
string
>::
value_type
entry
(
42
,
std
::
string
(
"fortytwo"
));
if
(
!
optEmptyContainers
)
{
test
.
insert
(
entry
);
...
...
src/libs/cplusplus/PreprocessorClient.cpp
View file @
a6ca3486
...
...
@@ -62,10 +62,10 @@ using namespace CPlusPlus;
/*!
\fn void Client::startExpandingMacro(unsigned offset, const Macro ¯o, const QByteArray &originalText, bool inCondition = false, const QVector<MacroArgumentReference> &actuals = QVector<MacroArgumentReference>())
Called when starting to expand a macro. The parameter \a inCondition indicates whether the
expansion is happening inside a preprocessor conditional.
\sa stopExpandingMacro()
*/
...
...
src/libs/cplusplus/ResolveExpression.cpp
View file @
a6ca3486
...
...
@@ -477,7 +477,7 @@ bool ResolveExpression::visit(CallAST *ast)
}
}
}
else
if
(
Function
*
funTy
=
ty
->
asFunctionType
())
{
}
else
if
(
Function
*
funTy
=
ty
->
asFunctionType
())
{
if
(
maybeValidPrototype
(
funTy
,
actualArgumentCount
))
addResult
(
funTy
->
returnType
().
simplified
(),
lastVisibleSymbol
);
...
...
@@ -601,7 +601,7 @@ ResolveExpression::resolveBaseExpression(const QList<Result> &baseResults, int a
Name
*
arrowAccessOp
=
control
()
->
operatorNameId
(
OperatorNameId
::
ArrowOp
);
const
QList
<
Symbol
*>
candidates
=
resolveClass
(
namedTy
->
name
(),
result
,
_context
);
foreach
(
Symbol
*
classObject
,
candidates
)
{
foreach
(
Symbol
*
classObject
,
candidates
)
{
const
QList
<
Result
>
overloads
=
resolveMember
(
arrowAccessOp
,
classObject
->
asClass
(),
namedTy
->
name
());
...
...
@@ -715,16 +715,16 @@ ResolveExpression::resolveMember(Name *memberName, Class *klass,
foreach
(
Symbol
*
candidate
,
candidates
)
{
FullySpecifiedType
ty
=
candidate
->
type
();
Name
*
unqualifiedNameId
=
className
;
if
(
QualifiedNameId
*
q
=
className
->
asQualifiedNameId
())
unqualifiedNameId
=
q
->
unqualifiedNameId
();
if
(
TemplateNameId
*
templId
=
unqualifiedNameId
->
asTemplateNameId
())
{
GenTemplateInstance
::
Substitution
subst
;
for
(
unsigned
i
=
0
;
i
<
templId
->
templateArgumentCount
();
++
i
)
{
FullySpecifiedType
templArgTy
=
templId
->
templateArgumentAt
(
i
);
if
(
i
<
klass
->
templateParameterCount
())
{
Name
*
templArgName
=
klass
->
templateParameterAt
(
i
)
->
name
();
if
(
templArgName
&&
templArgName
->
identifier
())
{
...
...
@@ -733,11 +733,11 @@ ResolveExpression::resolveMember(Name *memberName, Class *klass,
}
}
}
GenTemplateInstance
inst
(
_context
,
subst
);
ty
=
inst
(
candidate
);
}
results
.
append
(
Result
(
ty
,
candidate
));
}
...
...
src/libs/extensionsystem/optionsparser.h
View file @
a6ca3486
...
...
@@ -46,7 +46,7 @@ public:
QMap
<
QString
,
QString
>
*
foundAppOptions
,
QString
*
errorString
,
PluginManagerPrivate
*
pmPrivate
);
bool
parse
();
static
const
char
*
NO_LOAD_OPTION
;
...
...
@@ -63,13 +63,13 @@ private:
enum
TokenType
{
OptionalToken
,
RequiredToken
};
bool
nextToken
(
TokenType
type
=
OptionalToken
);
const
QStringList
&
m_args
;
const
QMap
<
QString
,
bool
>
&
m_appOptions
;
QMap
<
QString
,
QString
>
*
m_foundAppOptions
;
QString
*
m_errorString
;
PluginManagerPrivate
*
m_pmPrivate
;
// state
QString
m_currentArg
;
QStringList
::
const_iterator
m_it
;
...
...
src/libs/extensionsystem/plugindetailsview.h
View file @
a6ca3486
...
...
@@ -52,7 +52,7 @@ class EXTENSIONSYSTEM_EXPORT PluginDetailsView : public QWidget
public:
PluginDetailsView
(
QWidget
*
parent
=
0
);
~
PluginDetailsView
();
void
update
(
PluginSpec
*
spec
);
private:
...
...
src/libs/extensionsystem/pluginmanager.cpp
View file @
a6ca3486
...
...
@@ -328,12 +328,12 @@ QList<PluginSpec *> PluginManager::plugins() const
The caller (the application) may register itself for options via the \a appOptions list, containing pairs
of "option string" and a bool that indicates if the option requires an argument.
Application options always override any plugin's options.
\a foundAppOptions is set to pairs of ("option string", "argument") for any application options that were found.
The command line options that were not processed can be retrieved via the arguments() method.
If an error occurred (like missing argument for an option that requires one), \a errorString contains
a descriptive message of the error.
Returns if there was an error.
*/
bool
PluginManager
::
parseOptions
(
const
QStringList
&
args
,
...
...
src/libs/extensionsystem/pluginview.cpp
View file @
a6ca3486
...
...
@@ -72,7 +72,7 @@ Q_DECLARE_METATYPE(ExtensionSystem::PluginSpec*);
given plugin \a manager with a given \a parent widget.
*/
PluginView
::
PluginView
(
PluginManager
*
manager
,
QWidget
*
parent
)
:
QWidget
(
parent
),
:
QWidget
(
parent
),
m_ui
(
new
Internal
::
Ui
::
PluginView
),
p
(
new
Internal
::
PluginViewPrivate
)
{
...
...
src/libs/utils/abstractprocess_win.cpp
View file @
a6ca3486
...
...
@@ -31,7 +31,7 @@
#include
<windows.h>
namespace
Utils
{
namespace
Utils
{
QStringList
AbstractProcess
::
fixWinEnvironment
(
const
QStringList
&
env
)
{
...
...
src/libs/utils/savedaction.cpp
View file @
a6ca3486
...
...
@@ -55,7 +55,7 @@ using namespace Utils;
/*!
\class Utils::SavedAction
\brief The SavedAction class is a helper class for actions with persistent
state.
...
...
@@ -233,7 +233,7 @@ QAction *SavedAction::updatedAction(const QString &text0)
}
/*
Uses \c settingsGroup() and \c settingsKey() to restore the
Uses \c settingsGroup() and \c settingsKey() to restore the
item from \a settings,
\sa settingsKey(), settingsGroup(), writeSettings()
...
...
@@ -254,7 +254,7 @@ void SavedAction::readSettings(QSettings *settings)
}
/*
Uses \c settingsGroup() and \c settingsKey() to write the
Uses \c settingsGroup() and \c settingsKey() to write the
item to \a settings,
\sa settingsKey(), settingsGroup(), readSettings()
...
...
@@ -268,12 +268,12 @@ void SavedAction::writeSettings(QSettings *settings)
//qDebug() << "WRITING: " << m_settingsKey << " -> " << toString();
settings
->
endGroup
();
}
/*
A \c SavedAction can be connected to a widget, typically a
checkbox, radiobutton, or a lineedit in some configuration dialog.
The widget will retrieve its contents from the SavedAction's
The widget will retrieve its contents from the SavedAction's
value, and - depending on the \a ApplyMode - either write
changes back immediately, or when \s SavedAction::apply()
is called explicitly.
...
...
@@ -286,7 +286,7 @@ void SavedAction::connectWidget(QWidget *widget, ApplyMode applyMode)
qDebug
()
<<
"ALREADY CONNECTED: "
<<
widget
<<
m_widget
<<
toString
();
return
);
m_widget
=
widget
;
m_applyMode
=
applyMode
;
if
(
QAbstractButton
*
button
=
qobject_cast
<
QAbstractButton
*>
(
widget
))
{
if
(
button
->
isCheckable
())
{
button
->
setChecked
(
m_value
.
toBool
());
...
...
@@ -298,14 +298,14 @@ void SavedAction::connectWidget(QWidget *widget, ApplyMode applyMode)
}
}
else
if
(
QSpinBox
*
spinBox
=
qobject_cast
<
QSpinBox
*>
(
widget
))
{
spinBox
->
setValue
(
m_value
.
toInt
());
//qDebug() << "SETTING VALUE" << spinBox->value();
//qDebug() << "SETTING VALUE" << spinBox->value();
connect
(
spinBox
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
spinBoxValueChanged
(
int
)));
connect
(
spinBox
,
SIGNAL
(
valueChanged
(
QString
)),
this
,
SLOT
(
spinBoxValueChanged
(
QString
)));
}
else
if
(
QLineEdit
*
lineEdit
=
qobject_cast
<
QLineEdit
*>
(
widget
))
{
lineEdit
->
setText
(
m_value
.
toString
());
//qDebug() << "SETTING TEXT" << lineEdit->text();
//qDebug() << "SETTING TEXT" << lineEdit->text();
connect
(
lineEdit
,
SIGNAL
(
editingFinished
()),
this
,
SLOT
(
lineEditEditingFinished
()));
}
else
if
(
PathChooser
*
pathChooser
=
qobject_cast
<
PathChooser
*>
(
widget
))
{
...
...
src/libs/utils/savedaction.h
View file @
a6ca3486
...
...
@@ -72,7 +72,7 @@ public:
virtual
void
readSettings
(
QSettings
*
settings
);
Q_SLOT
virtual
void
writeSettings
(
QSettings
*
settings
);
virtual
void
connectWidget
(
QWidget
*
widget
,
ApplyMode
applyMode
=
DeferedApply
);
virtual
void
disconnectWidget
();
Q_SLOT
virtual
void
apply
(
QSettings
*
settings
);
...
...
src/libs/utils/submiteditorwidget.cpp
View file @
a6ca3486
...
...
@@ -236,7 +236,7 @@ static QString wrappedText(const QTextEdit *e)
const
QChar
newLine
=
QLatin1Char
(
'\n'
);
QString
rc
;
QTextCursor
cursor
(
e
->
document
());
cursor
.
movePosition
(
QTextCursor
::
Start
);
cursor
.
movePosition
(
QTextCursor
::
Start
);
while
(
!
cursor
.
atEnd
())
{
cursor
.
select
(
QTextCursor
::
LineUnderCursor
);
rc
+=
cursor
.
selectedText
();
...
...
@@ -272,7 +272,7 @@ void SubmitEditorWidget::setLineWrap(bool v)
qDebug
()
<<
Q_FUNC_INFO
<<
v
;
if
(
v
)
{
m_d
->
m_ui
.
description
->
setLineWrapColumnOrWidth
(
m_d
->
m_lineWidth
);
m_d
->
m_ui
.
description
->
setLineWrapMode
(
QTextEdit
::
FixedColumnWidth
);
m_d
->
m_ui
.
description
->
setLineWrapMode
(
QTextEdit
::
FixedColumnWidth
);
}
else
{
m_d
->
m_ui
.
description
->
setLineWrapMode
(
QTextEdit
::
NoWrap
);
}
...
...
@@ -488,7 +488,7 @@ void SubmitEditorWidget::insertDescriptionEditContextMenuAction(int pos, QAction
void
SubmitEditorWidget
::
editorCustomContextMenuRequested
(
const
QPoint
&
pos
)
{
QMenu
*
menu
=
m_d
->
m_ui
.
description
->
createStandardContextMenu
();
QMenu
*
menu
=
m_d
->
m_ui
.
description
->
createStandardContextMenu
();
// Extend
foreach
(
const
SubmitEditorWidgetPrivate
::
AdditionalContextMenuAction
&
a
,
m_d
->
descriptionEditContextMenuActions
)
{
if
(
a
.
second
)
{
...
...
src/libs/utils/submitfieldwidget.cpp
View file @
a6ca3486
...
...
@@ -104,7 +104,7 @@ void FieldEntry::deleteGuiLater()
clearButton
->
deleteLater
();
browseButton
->
deleteLater
();
toolBar
->
deleteLater
();
lineEdit
->
deleteLater
();
lineEdit
->
deleteLater
();
combo
->
deleteLater
();
layout
->
deleteLater
();
}
...
...
@@ -193,7 +193,7 @@ void SubmitFieldWidget::setFields(const QStringList & f)
{
// remove old fields
for
(
int
i
=
m_d
->
fieldEntries
.
size
()
-
1
;
i
>=
0
;
i
--
)
removeField
(
i
);
removeField
(
i
);
m_d
->
fields
=
f
;
if
(
!
f
.
empty
())
...
...
src/libs/utils/utils.pro
View file @
a6ca3486
...
...
@@ -37,7 +37,7 @@ SOURCES += reloadpromptutils.cpp \
fancymainwindow
.
cpp
\
detailsbutton
.
cpp
\
detailswidget
.
cpp
win32
{
win32
{
SOURCES
+=
abstractprocess_win
.
cpp
\
consoleprocess_win
.
cpp
\
winutils
.
cpp
...
...
src/libs/utils/winutils.cpp
View file @
a6ca3486
...
...
@@ -98,7 +98,7 @@ QTCREATOR_UTILS_EXPORT QString winGetDLLVersion(WinDLLVersionType t,
if
(
!
(
*
verQueryValueW
)(
data
,
TEXT
(
"
\\
"
),
&
versionInfo
,
&
len
))
{
*
errorMessage
=
QString
::
fromLatin1
(
"Unable to determine version string of %1: %2"
).
arg
(
name
,
winErrorMessage
(
GetLastError
()));
return
QString
();
}
}
QString
rc
;
switch
(
t
)
{
case
WinDLLFileVersion
:
...
...
Prev
1
2
3
4
5
…
11
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment