Commit ec09f48d authored by Denis Steckelmacher's avatar Denis Steckelmacher

Name code-completion test-files testX.qml instead of test_X.qml in order not...

Name code-completion test-files testX.qml instead of test_X.qml in order not to break the future module versioning

This commit also adds a DUChainReadLock that was missing
parent 61ec6a08
......@@ -43,7 +43,7 @@ static QFSFileEngine fileEngine;
namespace QmlJS {
QString filenameForTestId(const int id, bool qml) {
return basepath + "test_" + QString::number(id) + (qml ? ".qml" : ".js");
return basepath + "test" + QString::number(id) + (qml ? ".qml" : ".js");
}
QString nextFilename(bool qml) {
......@@ -141,6 +141,8 @@ const QList<CompletionTreeItem*> QmlCompletionTest::runCompletion(const Completi
bool QmlCompletionTest::containsItemForDeclarationNamed(const QList<CompletionTreeItem*> items, QString itemName)
{
DUChainReadLocker lock;
foreach (const CompletionTreeItem* ptr, items) {
if (ptr->declaration()) {
if (ptr->declaration()->identifier().toString() == itemName) {
......
Markdown is supported
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