Commit 2e556b5c authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Removed duplicated symbols.

parent 934e5d03
......@@ -3,6 +3,10 @@ TARGET = QmlEditor
include(../../qtcreatorplugin.pri)
include(qmleditor_dependencies.pri)
include(../../shared/qscripthighlighter/qscripthighlighter.pri)
DEPENDPATH += ../../shared/qscripthighlighter
CONFIG += help
DEFINES += \
QMLEDITOR_LIBRARY \
......
......@@ -5,9 +5,9 @@ QT += script
include(../../qtcreatorplugin.pri)
include(../../plugins/coreplugin/coreplugin.pri)
include(../../plugins/texteditor/texteditor.pri)
include(../../shared/qscripthighlighter/qscripthighlighter.pri)
include(parser/parser.pri)
include(../../shared/qscripthighlighter/qscripthighlighter.pri)
DEPENDPATH += ../../shared/qscripthighlighter
HEADERS += qtscripteditor.h \
......
......@@ -30,7 +30,6 @@
#ifndef QSCRIPTSYNTAXHIGHLIGHTER_H
#define QSCRIPTSYNTAXHIGHLIGHTER_H
#include <qscripthighlighter/qscripthighlighter_global.h>
#include <qscripthighlighter/qscriptincrementalscanner.h>
#include <QtCore/QVector>
......@@ -39,7 +38,7 @@
namespace SharedTools {
class QSCRIPTHIGHLIGHTER_EXPORT QScriptHighlighter : public QSyntaxHighlighter
class QScriptHighlighter : public QSyntaxHighlighter
{
Q_OBJECT
public:
......
......@@ -3,7 +3,7 @@ INCLUDEPATH *= $$PWD $$PWD/..
DEFINES += QSCRIPTHIGHLIGHTER_BUILD_LIB
SOURCES += $$PWD/qscriptincrementalscanner.cpp
HEADERS += $$PWD/qscriptincrementalscanner.h $$PWD/qscripthighlighter_global.h
HEADERS += $$PWD/qscriptincrementalscanner.h
contains(QT, gui) {
SOURCES += $$PWD/qscripthighlighter.cpp $$PWD/qscriptindenter.cpp
......
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/
#ifndef QSCRIPTHIGHLIGHTER_GLOBAL_H
#define QSCRIPTHIGHLIGHTER_GLOBAL_H
#include <QtCore/QtGlobal>
#ifdef QSCRIPTHIGHLIGHTER_BUILD_LIB
# define QSCRIPTHIGHLIGHTER_EXPORT Q_DECL_EXPORT
#else // !QSCRIPTHIGHLIGHTER
# define QSCRIPTHIGHLIGHTER_EXPORT Q_DECL_IMPORT
#endif // QSCRIPTHIGHLIGHTER
#endif // QSCRIPTHIGHLIGHTER_GLOBAL_H
......@@ -30,15 +30,13 @@
#ifndef QSCRIPTINCREMENTALSCANNER_H
#define QSCRIPTINCREMENTALSCANNER_H
#include <qscripthighlighter/qscripthighlighter_global.h>
#include <QtCore/QList>
#include <QtCore/QSet>
#include <QtCore/QString>
namespace SharedTools {
class QSCRIPTHIGHLIGHTER_EXPORT QScriptIncrementalScanner
class QScriptIncrementalScanner
{
public:
......
......@@ -369,7 +369,7 @@ bool QScriptIndenter::readLine()
the first if. The order of the if's is also important.
*/
if (yyLinizerState.inCComment) {
if (yyLinizerState.inComment) {
const QLatin1String slashAster("/*");
k = yyLinizerState.line.indexOf(slashAster);
......@@ -377,18 +377,18 @@ bool QScriptIndenter::readLine()
yyLinizerState.line.clear();
} else {
yyLinizerState.line.truncate(k);
yyLinizerState.inCComment = false;
yyLinizerState.inComment = false;
}
}
if (!yyLinizerState.inCComment) {
if (!yyLinizerState.inComment) {
const QLatin1String asterSlash("*/");
k = yyLinizerState.line.indexOf(asterSlash);
if (k != -1) {
for (int i = 0; i < k + 2; i++)
eraseChar(yyLinizerState.line, i, QLatin1Char(' '));
yyLinizerState.inCComment = true;
yyLinizerState.inComment = true;
}
}
......@@ -451,7 +451,7 @@ bool QScriptIndenter::readLine()
void QScriptIndenter::startLinizer()
{
yyLinizerState.braceDepth = 0;
yyLinizerState.inCComment = false;
yyLinizerState.inComment = false;
yyLinizerState.pendingRightBrace = false;
yyLine = &yyLinizerState.line;
......
......@@ -30,15 +30,13 @@
#ifndef QTSCRIPTINDENTER_H
#define QTSCRIPTINDENTER_H
#include <qscripthighlighter/qscripthighlighter_global.h>
#include <QtCore/QRegExp>
#include <QtCore/QStringList>
#include <QtGui/QTextBlock>
namespace SharedTools {
class QSCRIPTHIGHLIGHTER_EXPORT QScriptIndenter
class QScriptIndenter
{
Q_DISABLE_COPY(QScriptIndenter)
......@@ -95,13 +93,13 @@ private:
LinizerState()
: braceDepth(0),
leftBraceFollows(false),
inCComment(false),
inComment(false),
pendingRightBrace(false)
{ }
int braceDepth;
bool leftBraceFollows;
bool inCComment;
bool inComment;
bool pendingRightBrace;
QString line;
QTextBlock iter;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment