forked from qt-creator/qt-creator
Removed obsolete code.
This commit is contained in:
@@ -545,29 +545,6 @@ bool QmlCodeCompletion::triggersCompletion(TextEditor::ITextEditable *editor)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QmlCodeCompletion::isImported(Document::Ptr doc, const QString ¤tFilePath) const
|
|
||||||
{
|
|
||||||
if (! (doc && doc->qmlProgram()))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
QFileInfo fileInfo(doc->fileName());
|
|
||||||
const QString absolutePath = fileInfo.absolutePath();
|
|
||||||
|
|
||||||
for (AST::UiImportList *it = doc->qmlProgram()->imports; it; it = it->next) {
|
|
||||||
if (! (it->import && it->import->fileName))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
QString path = absolutePath;
|
|
||||||
path += QLatin1Char('/');
|
|
||||||
path += it->import->fileName->asString();
|
|
||||||
path = QDir::cleanPath(path);
|
|
||||||
if (path == currentFilePath)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool QmlCodeCompletion::isDelimiter(const QChar &ch) const
|
bool QmlCodeCompletion::isDelimiter(const QChar &ch) const
|
||||||
{
|
{
|
||||||
switch (ch.unicode()) {
|
switch (ch.unicode()) {
|
||||||
|
|||||||
@@ -73,7 +73,6 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void updateSnippets();
|
void updateSnippets();
|
||||||
bool isImported(QmlJS::Document::Ptr doc, const QString ¤tFilePath) const;
|
|
||||||
|
|
||||||
bool isDelimiter(const QChar &ch) const;
|
bool isDelimiter(const QChar &ch) const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user