forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/2.5'
This commit is contained in:
@@ -514,11 +514,13 @@ void CppFindReferences::cancel()
|
||||
void CppFindReferences::openEditor(const Find::SearchResultItem &item)
|
||||
{
|
||||
if (item.path.size() > 0) {
|
||||
TextEditor::BaseTextEditorWidget::openEditorAt(item.path.first(), item.lineNumber, item.textMarkPos,
|
||||
Core::Id(),
|
||||
Core::EditorManager::ModeSwitch);
|
||||
TextEditor::BaseTextEditorWidget::openEditorAt(QDir::fromNativeSeparators(item.path.first()),
|
||||
item.lineNumber, item.textMarkPos,
|
||||
Core::Id(),
|
||||
Core::EditorManager::ModeSwitch);
|
||||
} else {
|
||||
Core::EditorManager::instance()->openEditor(item.text, Core::Id(), Core::EditorManager::ModeSwitch);
|
||||
Core::EditorManager::instance()->openEditor(QDir::fromNativeSeparators(item.text),
|
||||
Core::Id(), Core::EditorManager::ModeSwitch);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -812,12 +812,21 @@ QStringList CppModelManager::internalFrameworkPaths() const
|
||||
QByteArray CppModelManager::internalDefinedMacros() const
|
||||
{
|
||||
QByteArray macros;
|
||||
QSet<QByteArray> alreadyIn;
|
||||
QMapIterator<ProjectExplorer::Project *, ProjectInfo> it(m_projects);
|
||||
while (it.hasNext()) {
|
||||
it.next();
|
||||
ProjectInfo pinfo = it.value();
|
||||
foreach (const ProjectPart::Ptr &part, pinfo.projectParts())
|
||||
macros += part->defines;
|
||||
foreach (const ProjectPart::Ptr &part, pinfo.projectParts()) {
|
||||
const QList<QByteArray> defs = part->defines.split('\n');
|
||||
foreach (const QByteArray &def, defs) {
|
||||
if (!alreadyIn.contains(def)) {
|
||||
macros += def;
|
||||
macros.append('\n');
|
||||
alreadyIn.insert(def);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return macros;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user