forked from qt-creator/qt-creator
ClangSupport: Break artificial dependency to Sqlite
Since the Sqlite library is not used anymore in clang there was only an dependency to the Utf8String in ClangSupport. As we move Utf8String and Utf8StringVector to ClangSupport we can break the dependency to Sqlite. Change-Id: I0012906345bc49a48a7262c1d6e204fb8aff01e1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -2,7 +2,7 @@ set(CLANG_VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PAT
|
||||
|
||||
add_qtc_library(ClangSupport
|
||||
DEPENDS Threads::Threads
|
||||
PUBLIC_DEPENDS Utils Sqlite Qt5::Core Qt5::Network
|
||||
PUBLIC_DEPENDS Utils Qt5::Core Qt5::Network
|
||||
PUBLIC_DEFINES
|
||||
CLANG_VERSION="${CLANG_VERSION}"
|
||||
CLANG_INCLUDE_DIR="${LLVM_LIBRARY_DIR}/clang/${CLANG_VERSION}/include"
|
||||
@@ -63,6 +63,8 @@ add_qtc_library(ClangSupport
|
||||
tooltipmessage.cpp tooltipmessage.h
|
||||
unsavedfilesremovedmessage.cpp unsavedfilesremovedmessage.h
|
||||
unsavedfilesupdatedmessage.cpp unsavedfilesupdatedmessage.h
|
||||
utf8string.cpp utf8string.h
|
||||
utf8stringvector.cpp utf8stringvector.h
|
||||
writemessageblock.cpp writemessageblock.h
|
||||
)
|
||||
|
||||
|
@@ -50,6 +50,8 @@ SOURCES += \
|
||||
$$PWD/tooltipmessage.cpp \
|
||||
$$PWD/tooltipinfo.cpp \
|
||||
$$PWD/unsavedfilesremovedmessage.cpp \
|
||||
$$PWD/utf8string.cpp \
|
||||
$$PWD/utf8stringvector.cpp \
|
||||
$$PWD/documentschangedmessage.cpp \
|
||||
$$PWD/documentvisibilitychangedmessage.cpp \
|
||||
$$PWD/writemessageblock.cpp \
|
||||
@@ -104,6 +106,8 @@ HEADERS += \
|
||||
$$PWD/tooltipmessage.h \
|
||||
$$PWD/tooltipinfo.h \
|
||||
$$PWD/unsavedfilesremovedmessage.h \
|
||||
$$PWD/utf8string.h \
|
||||
$$PWD/utf8stringvector.h \
|
||||
$$PWD/documentschangedmessage.h \
|
||||
$$PWD/documentvisibilitychangedmessage.h \
|
||||
$$PWD/writemessageblock.h \
|
||||
|
@@ -5,7 +5,6 @@ QtcLibrary {
|
||||
targetName: "Clangbackendipc"
|
||||
|
||||
Depends { name: "Qt.network" }
|
||||
Depends { name: "Sqlite" }
|
||||
Depends { name: "Utils" }
|
||||
|
||||
cpp.defines: base.concat("CLANGSUPPORT_BUILD_LIB")
|
||||
@@ -19,7 +18,6 @@ QtcLibrary {
|
||||
}
|
||||
|
||||
Export {
|
||||
Depends { name: "Sqlite" }
|
||||
Depends { name: "Utils" }
|
||||
Depends { name: "Qt.network" }
|
||||
cpp.includePaths: [
|
||||
|
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "filecontainer.h"
|
||||
|
||||
#include <utf8string.h>
|
||||
#include "utf8string.h"
|
||||
|
||||
#include <QDir>
|
||||
#include <QLoggingCategory>
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#include "codecompletionchunk.h"
|
||||
#include "fixitcontainer.h"
|
||||
|
||||
#include <sqlite/utf8string.h>
|
||||
#include "utf8string.h"
|
||||
|
||||
#include <QDataStream>
|
||||
#include <QVector>
|
||||
|
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "clangsupport_global.h"
|
||||
|
||||
#include <utf8string.h>
|
||||
#include "utf8string.h"
|
||||
|
||||
#include <QDataStream>
|
||||
#include <QVector>
|
||||
|
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "clangsupport_global.h"
|
||||
|
||||
#include <utf8string.h>
|
||||
#include "utf8string.h"
|
||||
#include <utf8stringvector.h>
|
||||
|
||||
#include <QDataStream>
|
||||
|
@@ -27,9 +27,9 @@
|
||||
|
||||
#include "clangsupport_global.h"
|
||||
|
||||
#include "utf8string.h"
|
||||
#include <QString>
|
||||
#include <QTextStream>
|
||||
#include <utf8string.h>
|
||||
|
||||
namespace ClangBackEnd {
|
||||
|
||||
|
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "clangsupport_global.h"
|
||||
|
||||
#include <utf8string.h>
|
||||
#include "utf8string.h"
|
||||
|
||||
#include <QDataStream>
|
||||
|
||||
|
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "clangsupport_global.h"
|
||||
|
||||
#include <sqlite/utf8string.h>
|
||||
#include "utf8string.h"
|
||||
|
||||
namespace ClangBackEnd {
|
||||
|
||||
|
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "sourcerangecontainer.h"
|
||||
|
||||
#include <sqlite/utf8string.h>
|
||||
#include "utf8string.h"
|
||||
|
||||
#include <QDataStream>
|
||||
|
||||
|
@@ -25,7 +25,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <utf8string.h>
|
||||
#include "utf8string.h"
|
||||
#include <utf8stringvector.h>
|
||||
|
||||
#include <QVariant>
|
||||
|
@@ -25,7 +25,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "sqliteglobal.h"
|
||||
#include "clangsupport_global.h"
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QDataStream>
|
||||
@@ -108,7 +108,7 @@ public:
|
||||
byteArray.replace(position, length, after.byteArray);
|
||||
}
|
||||
|
||||
SQLITE_EXPORT Utf8StringVector split(char separator) const;
|
||||
CLANGSUPPORT_EXPORT Utf8StringVector split(char separator) const;
|
||||
|
||||
void clear()
|
||||
{
|
||||
@@ -317,7 +317,7 @@ private:
|
||||
QByteArray byteArray;
|
||||
};
|
||||
|
||||
SQLITE_EXPORT QDebug operator<<(QDebug debug, const Utf8String &text);
|
||||
SQLITE_EXPORT std::ostream& operator<<(std::ostream &os, const Utf8String &utf8String);
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const Utf8String &text);
|
||||
CLANGSUPPORT_EXPORT std::ostream &operator<<(std::ostream &os, const Utf8String &utf8String);
|
||||
|
||||
#define Utf8StringLiteral(str) Utf8String::fromByteArray(QByteArrayLiteral(str))
|
@@ -25,7 +25,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "sqliteglobal.h"
|
||||
#include "clangsupport_global.h"
|
||||
#include "utf8string.h"
|
||||
|
||||
#include <QDataStream>
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include <ostream>
|
||||
|
||||
class SQLITE_EXPORT Utf8StringVector : public QVector<Utf8String>
|
||||
class CLANGSUPPORT_EXPORT Utf8StringVector : public QVector<Utf8String>
|
||||
{
|
||||
public:
|
||||
Utf8StringVector();
|
||||
@@ -100,6 +100,6 @@ inline QDataStream &operator<<(QDataStream &s, const Utf8StringVector &v)
|
||||
inline QDataStream &operator>>(QDataStream &s, Utf8StringVector &v)
|
||||
{ return s >> static_cast<QVector<Utf8String> &>(v); }
|
||||
|
||||
SQLITE_EXPORT QDebug operator<<(QDebug debug, const Utf8StringVector &textVector);
|
||||
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const Utf8StringVector &textVector);
|
||||
|
||||
Q_DECLARE_METATYPE(Utf8StringVector)
|
@@ -37,8 +37,6 @@ add_qtc_library(Sqlite
|
||||
sqlstatementbuilder.cpp sqlstatementbuilder.h
|
||||
sqlstatementbuilderexception.h
|
||||
tableconstraints.h
|
||||
utf8string.cpp utf8string.h
|
||||
utf8stringvector.cpp utf8stringvector.h
|
||||
sqliteblob.h
|
||||
sqlitetimestamp.h
|
||||
sqlitelibraryinitializer.cpp sqlitelibraryinitializer.h
|
||||
|
@@ -18,8 +18,6 @@ SOURCES += \
|
||||
$$PWD/sqlitesessionchangeset.cpp \
|
||||
$$PWD/sqlitesessions.cpp \
|
||||
$$PWD/sqlstatementbuilder.cpp \
|
||||
$$PWD/utf8string.cpp \
|
||||
$$PWD/utf8stringvector.cpp \
|
||||
$$PWD/sqlitedatabase.cpp \
|
||||
$$PWD/sqlitebasestatement.cpp
|
||||
HEADERS += \
|
||||
@@ -44,8 +42,6 @@ HEADERS += \
|
||||
$$PWD/sqlitewritestatement.h \
|
||||
$$PWD/sqlstatementbuilder.h \
|
||||
$$PWD/sqlstatementbuilderexception.h \
|
||||
$$PWD/utf8string.h \
|
||||
$$PWD/utf8stringvector.h \
|
||||
$$PWD/sqlitedatabase.h \
|
||||
$$PWD/sqlitetable.h \
|
||||
$$PWD/sqlitecolumn.h \
|
||||
|
@@ -27,7 +27,7 @@
|
||||
|
||||
#include <clangsupport/codecompletion.h>
|
||||
|
||||
#include <sqlite/utf8string.h>
|
||||
#include <clangsupport/utf8string.h>
|
||||
|
||||
#include <QString>
|
||||
|
||||
|
@@ -31,7 +31,7 @@
|
||||
|
||||
#include <clangsupport/sourcelocationcontainer.h>
|
||||
|
||||
#include <sqlite/utf8string.h>
|
||||
#include <clangsupport/utf8string.h>
|
||||
|
||||
#include <utils/textutils.h>
|
||||
|
||||
|
@@ -30,7 +30,7 @@
|
||||
|
||||
#include <clangsupport/tokeninfocontainer.h>
|
||||
|
||||
#include <sqlite/utf8string.h>
|
||||
#include <clangsupport/utf8string.h>
|
||||
|
||||
#include <clang-c/Index.h>
|
||||
|
||||
|
Reference in New Issue
Block a user