Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Tobias Hunger
qt-creator
Commits
520a5c9e
Commit
520a5c9e
authored
Dec 08, 2008
by
Roberto Raggi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Put the preprocessor the CPlusPlus namespace
parent
358eceac
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
26 additions
and
27 deletions
+26
-27
src/plugins/cpptools/cppmodelmanager.cpp
src/plugins/cpptools/cppmodelmanager.cpp
+7
-7
src/plugins/cpptools/rpp/pp-cctype.h
src/plugins/cpptools/rpp/pp-cctype.h
+2
-2
src/plugins/cpptools/rpp/pp-client.h
src/plugins/cpptools/rpp/pp-client.h
+2
-2
src/plugins/cpptools/rpp/pp-engine.cpp
src/plugins/cpptools/rpp/pp-engine.cpp
+0
-1
src/plugins/cpptools/rpp/pp-engine.h
src/plugins/cpptools/rpp/pp-engine.h
+3
-3
src/plugins/cpptools/rpp/pp-environment.cpp
src/plugins/cpptools/rpp/pp-environment.cpp
+1
-1
src/plugins/cpptools/rpp/pp-environment.h
src/plugins/cpptools/rpp/pp-environment.h
+2
-2
src/plugins/cpptools/rpp/pp-internal.h
src/plugins/cpptools/rpp/pp-internal.h
+2
-2
src/plugins/cpptools/rpp/pp-macro-expander.cpp
src/plugins/cpptools/rpp/pp-macro-expander.cpp
+1
-1
src/plugins/cpptools/rpp/pp-macro-expander.h
src/plugins/cpptools/rpp/pp-macro-expander.h
+2
-2
src/plugins/cpptools/rpp/pp-macro.h
src/plugins/cpptools/rpp/pp-macro.h
+2
-2
src/plugins/cpptools/rpp/pp-scanner.h
src/plugins/cpptools/rpp/pp-scanner.h
+2
-2
No files found.
src/plugins/cpptools/cppmodelmanager.cpp
View file @
520a5c9e
...
...
@@ -107,7 +107,7 @@ static const char pp_configuration[] =
namespace
CppTools
{
namespace
Internal
{
class
CppPreprocessor
:
public
rpp
::
Client
class
CppPreprocessor
:
public
CPlusPlus
::
Client
{
public:
CppPreprocessor
(
QPointer
<
CppModelManager
>
modelManager
);
...
...
@@ -132,9 +132,9 @@ protected:
virtual
void
macroAdded
(
const
QByteArray
&
macroName
,
const
QByteArray
&
macroText
);
virtual
void
startExpandingMacro
(
unsigned
offset
,
const
rpp
::
Macro
&
macro
,
const
Macro
&
macro
,
const
QByteArray
&
originalText
);
virtual
void
stopExpandingMacro
(
unsigned
offset
,
const
rpp
::
Macro
&
macro
);
virtual
void
stopExpandingMacro
(
unsigned
offset
,
const
Macro
&
macro
);
virtual
void
startSkippingBlocks
(
unsigned
offset
);
virtual
void
stopSkippingBlocks
(
unsigned
offset
);
virtual
void
sourceNeeded
(
QString
&
fileName
,
IncludeType
type
);
...
...
@@ -142,8 +142,8 @@ protected:
private:
QPointer
<
CppModelManager
>
m_modelManager
;
CppModelManager
::
DocumentTable
m_documents
;
rpp
::
Environment
env
;
rpp
::
pp
m_proc
;
Environment
env
;
pp
m_proc
;
QStringList
m_includePaths
;
QStringList
m_systemIncludePaths
;
QMap
<
QString
,
QByteArray
>
m_workingCopy
;
...
...
@@ -304,7 +304,7 @@ void CppPreprocessor::macroAdded(const QByteArray ¯oName, const QByteArray &
}
void
CppPreprocessor
::
startExpandingMacro
(
unsigned
offset
,
const
rpp
::
Macro
&
,
const
Macro
&
,
const
QByteArray
&
originalText
)
{
if
(
!
m_currentDoc
)
...
...
@@ -314,7 +314,7 @@ void CppPreprocessor::startExpandingMacro(unsigned offset,
m_currentDoc
->
addMacroUse
(
offset
,
originalText
.
length
());
}
void
CppPreprocessor
::
stopExpandingMacro
(
unsigned
,
const
rpp
::
Macro
&
)
void
CppPreprocessor
::
stopExpandingMacro
(
unsigned
,
const
Macro
&
)
{
if
(
!
m_currentDoc
)
return
;
...
...
src/plugins/cpptools/rpp/pp-cctype.h
View file @
520a5c9e
...
...
@@ -55,7 +55,7 @@
#include <cctype>
namespace
rpp
{
namespace
CPlusPlus
{
inline
bool
pp_isalpha
(
int
__ch
)
{
return
std
::
isalpha
((
unsigned
char
)
__ch
)
!=
0
;
}
...
...
@@ -69,6 +69,6 @@ inline bool pp_isdigit (int __ch)
inline
bool
pp_isspace
(
int
__ch
)
{
return
std
::
isspace
((
unsigned
char
)
__ch
)
!=
0
;
}
}
// namespace
rpp
}
// namespace
CPlusPlus
#endif // PP_CCTYPE_H
src/plugins/cpptools/rpp/pp-client.h
View file @
520a5c9e
...
...
@@ -38,7 +38,7 @@
#include <QString>
#include <QFile>
namespace
rpp
{
namespace
CPlusPlus
{
class
Macro
;
...
...
@@ -74,6 +74,6 @@ public:
virtual
void
stopSkippingBlocks
(
unsigned
offset
)
=
0
;
};
}
// namespace
rpp
}
// namespace
CPlusPlus
#endif // PP_CLIENT_H
src/plugins/cpptools/rpp/pp-engine.cpp
View file @
520a5c9e
...
...
@@ -57,7 +57,6 @@
#include <QtDebug>
#include <algorithm>
using
namespace
rpp
;
using
namespace
CPlusPlus
;
namespace
{
...
...
src/plugins/cpptools/rpp/pp-engine.h
View file @
520a5c9e
...
...
@@ -62,7 +62,7 @@ namespace CPlusPlus {
class
Token
;
}
namespace
rpp
{
namespace
CPlusPlus
{
struct
Value
{
...
...
@@ -200,7 +200,7 @@ namespace rpp {
Value
evalExpression
(
TokenIterator
firstToken
,
TokenIterator
lastToken
,
const
QByteArray
&
source
)
const
;
const
QByteArray
&
source
)
const
;
QVector
<
CPlusPlus
::
Token
>
tokenize
(
const
QByteArray
&
text
)
const
;
...
...
@@ -226,6 +226,6 @@ namespace rpp {
bool
isQtReservedWord
(
const
QByteArray
&
name
)
const
;
};
}
// namespace
rpp
}
// namespace
CPlusPlus
#endif // PP_ENGINE_H
src/plugins/cpptools/rpp/pp-environment.cpp
View file @
520a5c9e
...
...
@@ -54,7 +54,7 @@
#include "pp.h"
#include <cstring>
using
namespace
rpp
;
using
namespace
CPlusPlus
;
Environment
::
Environment
()
:
currentLine
(
0
),
...
...
src/plugins/cpptools/rpp/pp-environment.h
View file @
520a5c9e
...
...
@@ -56,7 +56,7 @@
#include <QVector>
#include <QByteArray>
namespace
rpp
{
namespace
CPlusPlus
{
struct
Macro
;
...
...
@@ -104,6 +104,6 @@ private:
int
_hash_count
;
};
}
// namespace
rpp
}
// namespace
CPlusPlus
#endif // PP_ENVIRONMENT_H
src/plugins/cpptools/rpp/pp-internal.h
View file @
520a5c9e
...
...
@@ -55,7 +55,7 @@
#include <QByteArray>
namespace
rpp
{
namespace
CPlusPlus
{
namespace
_PP_internal
{
inline
bool
comment_p
(
const
char
*
__first
,
const
char
*
__last
)
...
...
@@ -73,6 +73,6 @@ inline bool comment_p (const char *__first, const char *__last)
}
}
// _PP_internal
}
// namespace
rpp
}
// namespace
CPlusPlus
#endif // PP_INTERNAL_H
src/plugins/cpptools/rpp/pp-macro-expander.cpp
View file @
520a5c9e
...
...
@@ -35,7 +35,7 @@
#include "pp-macro-expander.h"
#include <QDateTime>
using
namespace
rpp
;
using
namespace
CPlusPlus
;
MacroExpander
::
MacroExpander
(
Environment
&
env
,
pp_frame
*
frame
)
:
env
(
env
),
frame
(
frame
),
...
...
src/plugins/cpptools/rpp/pp-macro-expander.h
View file @
520a5c9e
...
...
@@ -53,7 +53,7 @@
#ifndef PP_MACRO_EXPANDER_H
#define PP_MACRO_EXPANDER_H
namespace
rpp
{
namespace
CPlusPlus
{
struct
pp_frame
{
...
...
@@ -97,7 +97,7 @@ namespace rpp {
int
generated_lines
;
};
}
// namespace
rpp
}
// namespace
CPlusPlus
#endif // PP_MACRO_EXPANDER_H
src/plugins/cpptools/rpp/pp-macro.h
View file @
520a5c9e
...
...
@@ -56,7 +56,7 @@
#include <QByteArray>
#include <QVector>
namespace
rpp
{
namespace
CPlusPlus
{
struct
Macro
{
...
...
@@ -90,6 +90,6 @@ namespace rpp {
{
}
};
}
// namespace
rpp
}
// namespace
CPlusPlus
#endif // PP_MACRO_H
src/plugins/cpptools/rpp/pp-scanner.h
View file @
520a5c9e
...
...
@@ -53,7 +53,7 @@
#ifndef PP_SCANNER_H
#define PP_SCANNER_H
namespace
rpp
{
namespace
CPlusPlus
{
struct
pp_skip_blanks
{
...
...
@@ -373,7 +373,7 @@ struct pp_skip_argument
}
};
}
// namespace
rpp
}
// namespace
CPlusPlus
#endif // PP_SCANNER_H
...
...
Write
Preview
Markdown
is supported
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