Commit ed6f6a2a authored by hjk's avatar hjk

Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline

parents a0b4b8cd e28c1255
This diff is collapsed.
......@@ -451,14 +451,25 @@ void QuickOpenToolWindow::show(const QString &text, int selectionStart, int sele
void QuickOpenToolWindow::filterSelected()
{
const char * const TEXT = "<type here>";
QString searchText = "<type here>";
QAction *action = qobject_cast<QAction*>(sender());
QTC_ASSERT(action, return);
IQuickOpenFilter *filter = action->data().value<IQuickOpenFilter*>();
QTC_ASSERT(filter, return);
show(filter->shortcutString() + " " + TEXT,
QString currentText = m_fileLineEdit->text().trimmed();
// add shortcut string at front or replace existing shortcut string
if (!currentText.isEmpty()) {
searchText = currentText;
foreach (IQuickOpenFilter *otherfilter, m_quickOpenPlugin->filter()) {
if (currentText.startsWith(otherfilter->shortcutString() + " ")) {
searchText = currentText.mid(otherfilter->shortcutString().length()+1);
break;
}
}
}
show(filter->shortcutString() + " " + searchText,
filter->shortcutString().length() + 1,
QString(TEXT).length());
searchText.length());
updateCompletionList(m_fileLineEdit->text());
m_fileLineEdit->setFocus();
}
......
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