Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
7e9cf0f3
Commit
7e9cf0f3
authored
Jan 08, 2009
by
dt
Browse files
Merge commit 'origin/master'
parents
8c9e9383
c5f9695f
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
doc/doc.pri
View file @
7e9cf0f3
unix {
QDOC = SRCDIR=$$PWD OUTDIR=$$OUT_PWD/doc/html $$(QTDIR)/tools/qdoc3/qdoc3
HELPGENERATOR = qhelpgenerator
HELPGENERATOR =
$$(QTDIR)/bin/
qhelpgenerator
} else {
QDOC = $$(QTDIR)\tools\qdoc3\release\qdoc3.exe
HELPGENERATOR = qhelpgenerator
HELPGENERATOR =
$$(QTDIR)\bin\
qhelpgenerator
.exe
}
QHP_FILE = $$OUT_PWD/doc/html/qtcreator.qhp
...
...
shared/cplusplus/Parser.cpp
View file @
7e9cf0f3
...
...
@@ -68,6 +68,7 @@ Parser::Parser(TranslationUnit *unit)
_tokenIndex
(
1
),
_templateArguments
(
0
),
_qtMocRunEnabled
(
false
),
_objcEnabled
(
false
),
_inFunctionBody
(
false
)
{
}
...
...
@@ -2532,7 +2533,16 @@ bool Parser::parsePrimaryExpression(ExpressionAST *&node)
case
T_SLOT
:
return
parseQtMethod
(
node
);
case
T_AT_ENCODE
:
case
T_AT_PROTOCOL
:
case
T_AT_SELECTOR
:
case
T_AT_STRING_LITERAL
:
return
parseObjCExpression
(
node
);
default:
{
if
(
_objcEnabled
&&
LA
()
==
T_LBRACKET
)
return
parseObjCExpression
(
node
);
unsigned
startOfName
=
cursor
();
NameAST
*
name
=
0
;
if
(
parseName
(
name
))
{
...
...
@@ -3296,17 +3306,17 @@ bool Parser::parseObjCClassDeclaration(DeclarationAST *&node)
return
true
;
}
bool
Parser
::
parseObjCInterfaceDeclaration
(
DeclarationAST
*&
node
)
bool
Parser
::
parseObjCInterfaceDeclaration
(
DeclarationAST
*&
)
{
if
(
LA
()
!=
T_AT_INTERFACE
)
return
false
;
unsigned
interface_token
=
consumeToken
();
/*
unsigned interface_token =
*/
consumeToken
();
unsigned
interface_name_token
=
0
;
match
(
T_IDENTIFIER
,
&
interface_name_token
);
if
(
LA
()
==
T_LPAREN
)
{
// category interface
unsigned
lparen_token
=
consumeToken
();
/*
unsigned lparen_token =
*/
consumeToken
();
unsigned
catagory_name_token
=
0
;
if
(
LA
()
==
T_IDENTIFIER
)
catagory_name_token
=
consumeToken
();
...
...
@@ -3335,27 +3345,27 @@ bool Parser::parseObjCInterfaceDeclaration(DeclarationAST *&node)
return
false
;
}
bool
Parser
::
parseObjCProtocolDeclaration
(
DeclarationAST
*&
node
)
bool
Parser
::
parseObjCProtocolDeclaration
(
DeclarationAST
*&
)
{
return
false
;
}
bool
Parser
::
parseObjCEndDeclaration
(
DeclarationAST
*&
node
)
bool
Parser
::
parseObjCEndDeclaration
(
DeclarationAST
*&
)
{
return
false
;
}
bool
Parser
::
parseObjCAliasDeclaration
(
DeclarationAST
*&
node
)
bool
Parser
::
parseObjCAliasDeclaration
(
DeclarationAST
*&
)
{
return
false
;
}
bool
Parser
::
parseObjCPropertySynthesize
(
DeclarationAST
*&
node
)
bool
Parser
::
parseObjCPropertySynthesize
(
DeclarationAST
*&
)
{
return
false
;
}
bool
Parser
::
parseObjCPropertyDynamic
(
DeclarationAST
*&
node
)
bool
Parser
::
parseObjCPropertyDynamic
(
DeclarationAST
*&
)
{
return
false
;
}
...
...
@@ -3376,6 +3386,7 @@ bool Parser::parseObjCIdentifierList(IdentifierListAST *&node)
*
it
=
id
;
}
}
return
true
;
}
return
false
;
}
...
...
@@ -3418,15 +3429,16 @@ bool Parser::parseObjCInterfaceMemberDeclaration()
default:
{
DeclarationAST
*
declaration
=
0
;
parseDeclaration
(
declaration
);
if
(
parseDeclaration
(
declaration
))
return
true
;
}
// default
}
// switch
return
tru
e
;
return
fals
e
;
}
bool
Parser
::
parseObjCPropertyDeclaration
(
DeclarationAST
*&
ast
)
bool
Parser
::
parseObjCPropertyDeclaration
(
DeclarationAST
*&
)
{
return
false
;
}
...
...
@@ -3437,8 +3449,7 @@ bool Parser::parseObjCMethodPrototype()
return
false
;
// instance or class method?
unsigned
method_type_token
=
consumeToken
();
/*unsigned method_type_token = */
consumeToken
();
SpecifierAST
*
attributes
=
0
,
**
attr
=
&
attributes
;
while
(
parseAttributeSpecifier
(
*
attr
))
...
...
@@ -3447,6 +3458,135 @@ bool Parser::parseObjCMethodPrototype()
return
false
;
}
bool
Parser
::
parseObjCExpression
(
ExpressionAST
*&
node
)
{
switch
(
LA
())
{
case
T_LBRACKET
:
return
parseObjCMessageExpression
(
node
);
case
T_AT_STRING_LITERAL
:
return
parseObjCStringLiteral
(
node
);
case
T_AT_ENCODE
:
return
parseObjCEncodeExpression
(
node
);
case
T_AT_PROTOCOL
:
return
parseObjCProtocolExpression
(
node
);
case
T_AT_SELECTOR
:
return
parseObjCSelectorExpression
(
node
);
}
return
false
;
}
bool
Parser
::
parseObjCMessageExpression
(
ExpressionAST
*&
)
{
if
(
LA
()
!=
T_LBRACKET
)
return
false
;
/*unsigned lbracket_token = */
consumeToken
();
ExpressionAST
*
receiver
=
0
;
parseObjCMessageReceiver
(
receiver
);
parseObjCMessageArguments
();
unsigned
rbracket_token
=
0
;
match
(
T_RBRACKET
,
&
rbracket_token
);
return
true
;
}
bool
Parser
::
parseObjCStringLiteral
(
ExpressionAST
*&
)
{
if
(
LA
()
!=
T_AT_STRING_LITERAL
)
return
false
;
do
{
consumeToken
();
}
while
(
LA
()
==
T_AT_STRING_LITERAL
);
return
true
;
}
bool
Parser
::
parseObjCEncodeExpression
(
ExpressionAST
*&
)
{
if
(
LA
()
!=
T_AT_ENCODE
)
return
false
;
/*unsigned encode_token = */
consumeToken
();
unsigned
lparen_token
=
0
,
rparen_token
=
0
;
match
(
T_LPAREN
,
&
lparen_token
);
SpecifierAST
*
type_specifier
=
0
;
parseSimpleTypeSpecifier
(
type_specifier
);
match
(
T_RPAREN
,
&
rparen_token
);
return
true
;
}
bool
Parser
::
parseObjCProtocolExpression
(
ExpressionAST
*&
)
{
if
(
LA
()
!=
T_AT_PROTOCOL
)
return
false
;
/*unsigned protocol_token = */
consumeToken
();
unsigned
protocol_name_token
=
0
,
lparen_token
=
0
,
rparen_token
=
0
;
match
(
T_LPAREN
,
&
lparen_token
);
match
(
T_IDENTIFIER
,
&
protocol_name_token
);
match
(
T_RPAREN
,
&
rparen_token
);
return
true
;
}
bool
Parser
::
parseObjCSelectorExpression
(
ExpressionAST
*&
)
{
if
(
LA
()
!=
T_AT_SELECTOR
)
return
false
;
/*unsigned selector_token = */
consumeToken
();
unsigned
lparen_token
=
0
,
rparen_token
=
0
;
match
(
T_LPAREN
,
&
lparen_token
);
while
(
LA
(
1
)
==
T_IDENTIFIER
&&
LA
(
2
)
==
T_COLON
)
{
/*unsigned identifier_token = */
consumeToken
();
/*unsigned colon_token = */
consumeToken
();
}
match
(
T_RPAREN
,
&
rparen_token
);
return
true
;
}
bool
Parser
::
parseObjCMessageReceiver
(
ExpressionAST
*&
node
)
{
// ### expression or simple-type-specifier.
return
parseExpression
(
node
);
}
bool
Parser
::
parseObjCMessageArguments
()
{
if
(
LA
()
!=
T_IDENTIFIER
&&
LA
()
!=
T_COLON
)
return
false
;
unsigned
selector_name_token
=
0
;
if
(
LA
()
==
T_IDENTIFIER
)
selector_name_token
=
consumeToken
();
if
(
LA
()
==
T_COLON
)
{
/*unsigned colon_token = */
consumeToken
();
ExpressionAST
*
expr
=
0
;
parseAssignmentExpression
(
expr
);
while
((
LA
()
==
T_IDENTIFIER
&&
LA
(
2
)
==
T_COLON
)
||
LA
()
==
T_COLON
)
{
if
(
LA
()
==
T_IDENTIFIER
)
consumeToken
();
if
(
LA
()
==
T_COLON
)
consumeToken
();
parseAssignmentExpression
(
expr
);
}
while
(
LA
()
==
T_COMMA
)
{
consumeToken
();
parseAssignmentExpression
(
expr
);
}
}
return
true
;
}
CPLUSPLUS_END_NAMESPACE
shared/cplusplus/Parser.h
View file @
7e9cf0f3
...
...
@@ -214,13 +214,23 @@ public:
bool
parseObjCIdentifierList
(
IdentifierListAST
*&
node
);
bool
parseObjCPropertyDeclaration
(
DeclarationAST
*&
ast
);
bool
parseObjCPropertyDeclaration
(
DeclarationAST
*&
node
);
bool
parseObjCProtocolRefs
();
bool
parseObjCClassInstanceVariables
();
bool
parseObjCInterfaceMemberDeclaration
();
bool
parseObjCInterfaceDeclList
();
bool
parseObjCMethodPrototype
();
bool
parseObjCExpression
(
ExpressionAST
*&
node
);
bool
parseObjCMessageExpression
(
ExpressionAST
*&
node
);
bool
parseObjCStringLiteral
(
ExpressionAST
*&
node
);
bool
parseObjCEncodeExpression
(
ExpressionAST
*&
node
);
bool
parseObjCProtocolExpression
(
ExpressionAST
*&
node
);
bool
parseObjCSelectorExpression
(
ExpressionAST
*&
node
);
bool
parseObjCMessageReceiver
(
ExpressionAST
*&
node
);
bool
parseObjCMessageArguments
();
// Qt MOC run
bool
parseQtMethod
(
ExpressionAST
*&
node
);
...
...
@@ -245,8 +255,8 @@ private:
bool
switchTemplateArguments
(
bool
templateArguments
);
bool
blockErrors
(
bool
block
);
inline
const
Token
&
tok
()
const
{
return
_translationUnit
->
tokenAt
(
_tokenIndex
);
}
inline
const
Token
&
tok
(
int
i
=
1
)
const
{
return
_translationUnit
->
tokenAt
(
_tokenIndex
+
i
-
1
);
}
inline
int
LA
(
int
n
=
1
)
const
{
return
_translationUnit
->
tokenKind
(
_tokenIndex
+
n
-
1
);
}
...
...
@@ -267,6 +277,7 @@ private:
unsigned
_tokenIndex
;
bool
_templateArguments
:
1
;
bool
_qtMocRunEnabled
:
1
;
bool
_objcEnabled
:
1
;
bool
_inFunctionBody
:
1
;
private:
...
...
src/plugins/cpptools/cppcodecompletion.cpp
View file @
7e9cf0f3
...
...
@@ -723,7 +723,7 @@ bool CppCodeCompletion::completeScope(const QList<TypeOfExpression::Result> &res
return
false
;
// nothing to do.
// Search for a class or a namespace.
TypeOfExpression
::
Result
result
(
FullySpecifiedType
(),
0
)
;
TypeOfExpression
::
Result
result
;
foreach
(
result
,
results
)
{
FullySpecifiedType
ty
=
result
.
first
;
...
...
@@ -751,8 +751,7 @@ bool CppCodeCompletion::completeScope(const QList<TypeOfExpression::Result> &res
}
else
if
(
Symbol
*
symbol
=
result
.
second
)
{
if
(
symbol
->
isTypedef
())
{
ResolveClass
resolveClass
;
const
QList
<
Symbol
*>
candidates
=
resolveClass
(
result
,
context
);
const
QList
<
Symbol
*>
candidates
=
resolveClass
(
result
,
context
);
completeClass
(
candidates
,
context
);
}
}
...
...
src/plugins/fakevim/handler.cpp
View file @
7e9cf0f3
This diff is collapsed.
Click to expand it.
src/plugins/qt4projectmanager/deployhelper.cpp
View file @
7e9cf0f3
...
...
@@ -33,6 +33,7 @@
#include "deployhelper.h"
#include "qt4project.h"
#include "qt4projectmanagerconstants.h"
#include <QDebug>
#include <QDir>
...
...
@@ -183,7 +184,7 @@ void DeployHelperRunStep::readyRead()
QString
DeployHelperRunStep
::
name
()
{
return
"trolltech.qt4projectmanager.deployhelperrunstep"
;
return
Constants
::
DEPLOYHELPERRUNSTEP
;
}
QString
DeployHelperRunStep
::
displayName
()
...
...
src/plugins/qt4projectmanager/profileeditor.cpp
View file @
7e9cf0f3
...
...
@@ -132,8 +132,8 @@ void ProFileEditor::setFontSettings(const TextEditor::FontSettings &fs)
static
QVector
<
QString
>
categories
;
if
(
categories
.
isEmpty
())
{
categories
<<
QLatin1String
(
TextEditor
::
Constants
::
C_
VARIABL
E
)
<<
QLatin1String
(
TextEditor
::
Constants
::
C_
FUNCTION
)
categories
<<
QLatin1String
(
TextEditor
::
Constants
::
C_
TYP
E
)
<<
QLatin1String
(
TextEditor
::
Constants
::
C_
KEYWORD
)
<<
QLatin1String
(
TextEditor
::
Constants
::
C_COMMENT
);
}
...
...
src/plugins/qt4projectmanager/profileeditorfactory.cpp
View file @
7e9cf0f3
...
...
@@ -36,7 +36,6 @@
#include "qt4projectmanager.h"
#include "qt4projectmanagerconstants.h"
#include "profileeditor.h"
#include "qt4projectmanagerenums.h"
#include <coreplugin/icore.h>
#include <coreplugin/fileiconprovider.h>
...
...
src/plugins/qt4projectmanager/profilehighlighter.h
View file @
7e9cf0f3
...
...
@@ -34,8 +34,6 @@
#ifndef PROFILEHIGHLIGHTER_H
#define PROFILEHIGHLIGHTER_H
#include "qt4projectmanagerenums.h"
#include <QtCore/QtAlgorithms>
#include <QtGui/QSyntaxHighlighter>
#include <QtGui/QTextCharFormat>
...
...
@@ -47,6 +45,13 @@ class ProFileHighlighter : public QSyntaxHighlighter
{
Q_OBJECT
public:
enum
ProfileFormats
{
ProfileVariableFormat
,
ProfileFunctionFormat
,
ProfileCommentFormat
,
NumProfileFormats
};
ProFileHighlighter
(
QTextDocument
*
document
=
0
);
virtual
void
highlightBlock
(
const
QString
&
text
);
...
...
@@ -58,7 +63,6 @@ public:
private:
QTextCharFormat
m_formats
[
NumProfileFormats
];
};
}
// namespace Internal
...
...
src/plugins/qt4projectmanager/qt4projectmanager.pro
View file @
7e9cf0f3
...
...
@@ -5,7 +5,6 @@ include(../../qworkbenchplugin.pri)
include
(
qt4projectmanager_dependencies
.
pri
)
HEADERS
=
qt4projectmanagerplugin
.
h
\
qt4projectmanager
.
h
\
qt4projectmanagerenums
.
h
\
qtversionmanager
.
h
\
qt4project
.
h
\
qt4nodes
.
h
\
...
...
@@ -45,7 +44,6 @@ HEADERS = qt4projectmanagerplugin.h \
projectloadwizard
.
h
\
directorywatcher
.
h
\
gdbmacrosbuildstep
.
h
SOURCES
=
qt4projectmanagerplugin
.
cpp
\
qt4projectmanager
.
cpp
\
qtversionmanager
.
cpp
\
...
...
@@ -84,7 +82,6 @@ SOURCES = qt4projectmanagerplugin.cpp \
projectloadwizard
.
cpp
\
directorywatcher
.
cpp
\
gdbmacrosbuildstep
.
cpp
FORMS
=
qtversionmanager
.
ui
\
envvariablespage
.
ui
\
enveditdialog
.
ui
\
...
...
src/plugins/qt4projectmanager/qt4projectmanagerconstants.h
View file @
7e9cf0f3
...
...
@@ -77,6 +77,7 @@ const char * const QMAKESTEP = "trolltech.qt4projectmanager.qmake";
const
char
*
const
MAKESTEP
=
"trolltech.qt4projectmanager.make"
;
const
char
*
const
GDBMACROSBUILDSTEP
=
"trolltech.qt4projectmanager.gdbmaros"
;
const
char
*
const
QT4RUNSTEP
=
"trolltech.qt4projectmanager.qt4runstep"
;
const
char
*
const
DEPLOYHELPERRUNSTEP
=
"trolltech.qt4projectmanager.deployhelperrunstep"
;
// build parsers
const
char
*
const
BUILD_PARSER_MSVC
=
"BuildParser.MSVC"
;
...
...
src/plugins/qt4projectmanager/qt4projectmanagerenums.h
deleted
100644 → 0
View file @
8c9e9383
/***************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Qt Software Information (qt-info@nokia.com)
**
**
** Non-Open Source Usage
**
** Licensees may use this file in accordance with the Qt Beta Version
** License Agreement, Agreement version 2.2 provided with the Software or,
** alternatively, in accordance with the terms contained in a written
** agreement between you and Nokia.
**
** GNU General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU General
** Public License versions 2.0 or 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the packaging
** of this file. Please review the following information to ensure GNU
** General Public Licensing requirements will be met:
**
** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
** http://www.gnu.org/copyleft/gpl.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt GPL Exception
** version 1.3, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#ifndef QT4PRO_ENUMS_H
#define QT4PRO_ENUMS_H
namespace
Qt4ProjectManager
{
namespace
Internal
{
enum
ProfileFormats
{
ProfileVariableFormat
,
ProfileFunctionFormat
,
ProfileCommentFormat
,
NumProfileFormats
};
}
// namespace Internal
}
// namespace Qt4ProjectManager
#endif // QT4PRO_ENUMS_H
src/plugins/texteditor/texteditorconstants.h
View file @
7e9cf0f3
...
...
@@ -91,9 +91,6 @@ const char * const C_REMOVED_LINE = "RemovedLine";
const
char
*
const
C_DIFF_FILE
=
"DiffFile"
;
const
char
*
const
C_DIFF_LOCATION
=
"DiffLocation"
;
const
char
*
const
C_VARIABLE
=
"Variable"
;
const
char
*
const
C_FUNCTION
=
"Function"
;
}
// namespace Constants
}
// namespace TextEditor
...
...
src/plugins/texteditor/texteditorsettings.cpp
View file @
7e9cf0f3
...
...
@@ -91,10 +91,6 @@ TextEditorSettings::TextEditorSettings(Internal::TextEditorPlugin *plugin,
formatDescriptions
.
push_back
(
FormatDescription
(
QLatin1String
(
C_DIFF_FILE
),
tr
(
"Diff File"
),
Qt
::
black
));
formatDescriptions
.
push_back
(
FormatDescription
(
QLatin1String
(
C_DIFF_LOCATION
),
tr
(
"Diff Location"
),
Qt
::
green
));
// Pro file categories
formatDescriptions
.
push_back
(
FormatDescription
(
QLatin1String
(
C_VARIABLE
),
tr
(
"Variable"
),
Qt
::
blue
));
formatDescriptions
.
push_back
(
FormatDescription
(
QLatin1String
(
C_FUNCTION
),
tr
(
"Function"
),
Qt
::
green
));
m_fontSettingsPage
=
new
FontSettingsPage
(
formatDescriptions
,
QLatin1String
(
"TextEditor"
),
tr
(
"Text Editor"
),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment