aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clangrefactoring
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2018-11-09 13:30:40 +0100
committerEike Ziller <eike.ziller@qt.io>2018-11-09 13:30:40 +0100
commit3666e3aaeb26f91097a473491ea4cf58219029ca (patch)
tree2d1387557e243eacfe78698371c7726aa9a19350 /src/plugins/clangrefactoring
parent951eb885af8692c2c4aac67d18e3cbf033b7e912 (diff)
parentdc82e49b62d6b851900689321828aee95f8eab54 (diff)
Merge remote-tracking branch 'origin/4.8'
Conflicts: tests/unit/unittest/unittest.pro Change-Id: I4f0ab05f96ee60900a3a35fad4c7331238367593
Diffstat (limited to 'src/plugins/clangrefactoring')
-rw-r--r--src/plugins/clangrefactoring/querysqlitestatementfactory.h4
-rw-r--r--src/plugins/clangrefactoring/sourcelocations.h4
-rw-r--r--src/plugins/clangrefactoring/symbolquery.h4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/clangrefactoring/querysqlitestatementfactory.h b/src/plugins/clangrefactoring/querysqlitestatementfactory.h
index 21a1f022ec..14fc27149d 100644
--- a/src/plugins/clangrefactoring/querysqlitestatementfactory.h
+++ b/src/plugins/clangrefactoring/querysqlitestatementfactory.h
@@ -40,7 +40,7 @@ public:
{}
Database &database;
ReadStatement selectLocationsForSymbolLocation{
- "SELECT directoryId, sourceId, line, column FROM locations JOIN sources USING(sourceId) WHERE symbolId = "
+ "SELECT sourceId, line, column FROM locations WHERE symbolId = "
" (SELECT symbolId FROM locations WHERE sourceId=? AND line=? AND column=?) "
"ORDER BY sourceId, line, column",
database};
@@ -59,7 +59,7 @@ public:
"SELECT symbolId, symbolName, signature FROM symbols WHERE symbolKind IN (?,?,?) AND symbolName LIKE ?",
database};
ReadStatement selectLocationOfSymbol{
- "SELECT (SELECT directoryId FROM sources WHERE sourceId = l.sourceId), sourceId, line, column FROM locations AS l WHERE symbolId = ? AND locationKind = ?",
+ "SELECT sourceId, line, column FROM locations AS l WHERE symbolId = ? AND locationKind = ?",
database};
};
diff --git a/src/plugins/clangrefactoring/sourcelocations.h b/src/plugins/clangrefactoring/sourcelocations.h
index 9766a779b5..80fc0d89c0 100644
--- a/src/plugins/clangrefactoring/sourcelocations.h
+++ b/src/plugins/clangrefactoring/sourcelocations.h
@@ -45,8 +45,8 @@ public:
SourceLocation(ClangBackEnd::FilePathId filePathId, int line, int column)
: filePathId{filePathId}, lineColumn{line, column}
{}
- SourceLocation(int directoryId, int sourceId, int line, int column)
- : filePathId{directoryId, sourceId}, lineColumn{line, column}
+ SourceLocation(int sourceId, int line, int column)
+ : filePathId{sourceId}, lineColumn{line, column}
{}
friend bool operator==(SourceLocation first, SourceLocation second)
diff --git a/src/plugins/clangrefactoring/symbolquery.h b/src/plugins/clangrefactoring/symbolquery.h
index 507d032f06..b5a46ab7e6 100644
--- a/src/plugins/clangrefactoring/symbolquery.h
+++ b/src/plugins/clangrefactoring/symbolquery.h
@@ -55,7 +55,7 @@ public:
const std::size_t reserveSize = 128;
- return locationsStatement.template values<SourceLocation, 4>(reserveSize,
+ return locationsStatement.template values<SourceLocation, 3>(reserveSize,
filePathId.filePathId,
line,
utf8Column);
@@ -120,7 +120,7 @@ public:
{
ReadStatement &statement = m_statementFactory.selectLocationOfSymbol;
- return statement.template value<SourceLocation, 4>(symbolId, int(kind));
+ return statement.template value<SourceLocation, 3>(symbolId, int(kind));
}
private:
StatementFactory &m_statementFactory;