Commit Graph

107 Commits

Author SHA1 Message Date
hjk
3f5caf4cdc Utils: Wrap MimeDatabase into static functions
To avoid repeating the 'MimeDatabase mdb; mdb.something(); ' mantra
all over the place.

Change-Id: I4bfef62e73275a991455141671d6071162788e9d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-03-03 07:57:54 +00:00
Orgad Shaneh
7b3642cce4 Merge remote-tracking branch 'origin/4.2'
Change-Id: I259a402bc896fc2e359cc96b7510453ac9a9a552
2016-11-28 15:27:51 +02:00
Friedemann Kleint
14eadb0f6d Fix accessing temporary copies via QStringRef
Amends change 840e787175

Change-Id: I633500b0fdbeeeb8b3d8accd3aec1e2990c62bca
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-28 08:25:14 +00:00
Friedemann Kleint
840e787175 Use QString::splitRef() instead of QString::split()
Avoid string allocation where it seems feasible.

Change-Id: I61b23d4ef8a459f5aa77727a75f4e1d2b140da3b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-25 11:32:47 +00:00
Eike Ziller
fc69e4ef54 Fix that it was not possible to save with arbitrary file extension
On Windows.

Task-number: QTCREATORBUG-15862
Change-Id: I5cc76662e4996bfa26eece09f2e30dc3ce873eb5
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-15 11:39:12 +00:00
Eike Ziller
b5f587efb5 Fix that save as from "file was removed" dialog didn't provide filters
Also removes some code duplication.

Change-Id: I4f4616717f2eb37a1c73accdfa81e6d0dae6809f
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-14 09:03:29 +00:00
Jarek Kobus
1414826183 Implement diff on close, on revert and on external modification
Task-number: QTCREATORBUG-1531
Change-Id: I8c9a740d66eb7836b3df6850ac243260fd282b32
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-10-21 09:20:20 +00:00
Jarek Kobus
ca4be197ef Revert "Replace virtual isModified method with a getter/setter/notifier"
This doesn't fix the issue with cleaning the clear state of undo stack.
This introduced the issue when ui file is opened it's marked as modified.
It reverts 59c90e00c1
and d0c537ca75

Change-Id: Ifd4ff8483d6c297461632de500a4502b1fd0871f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-10-21 09:19:56 +00:00
Jarek Kobus
d0c537ca75 Mark file modified externally as modified after the prompt
In case when the user has chosen not to reload the file.

Task-number: QTCREATORBUG-17048
Change-Id: I4eb78af2dbc655ab5e0f3fa19f506aa2302d7877
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-10-17 14:44:36 +00:00
Alessandro Portale
d8e94afb51 Core: Native dir separators for DMgr::getSaveFileName warning
User visible paths need native ones.

Change-Id: I4fbadd9cf63fbb9c513b45eb6001107dbc162f86
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-08-08 18:48:01 +00:00
Orgad Shaneh
08f807a134 Core: Use a consistent initial directory in open/save/locator
Use fileDialogInitialDirectory() for all of them.

Conditionally initialize lastVisitedDirectory to projects directory to
preserve existing behavior on Open, when no project is open yet.

Change-Id: I318a7c7741e70a68758f0cc068ce956135103f3f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-05-04 09:42:14 +00:00
Eike Ziller
16c7a262cc DocumentManager: Fix issues with handling of externally modified files
Use ApplicationState and ApplicationStateChange event instead of
deprecated ApplicationActivate event and unreliable
QApplication::activeWindow(). That fixes an issue where the file change
dialog was not shown after closing a modal dialog on Linux, because
there the activeWindow is temporarily set to 0 for some reason.

Also avoid excessive timer. Modifying a file that is open in Qt Creator
should not result in the system waking up 5 times a second afterwards.

Task-number: QTCREATORBUG-15687
Change-Id: I105d08cd590cc3c8ee5d8efdc568ad5fd2be0857
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-03-04 10:49:15 +00:00
Orgad Shaneh
5646480f27 Core: Use Qt5-style connects
The heavy lifting was done by clazy.

Change-Id: I2dde14919d917816d02117338205f8f861d8af0a
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-03 07:54:02 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Eike Ziller
cfc89a685e IDocument: Rename defaultPath and suggestedFileName
To fallbackSaveAsPath and fallbackSaveAsFileName. That makes it clearer
what they are for, and that they actually belong to each other.

Change-Id: Ie5b83b9db77d39a7fe9e979cc8f22b7f5b9101a3
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-01-14 14:40:45 +00:00
Eike Ziller
29c7bcdf7e Revert "Core: Reinitialize change notification after saving"
This reverts commit 540f5677e8.
For some reason the change broke reparsing of .pro files after
they are edited.

Change-Id: I61560d3d7a3ccd8aac72c80b37421ed924f2323c
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-07-06 11:04:16 +00:00
Finn Brudal
540f5677e8 Core: Reinitialize change notification after saving
When saving a version controlled file, a new version might be created.
Therefore, ensure that the current file version is being monitored.

Change-Id: Icad41bc5a443561de0c0e878aa893913dc674173
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-15 06:59:18 +00:00
Nikolai Kosjar
7050f78b8d Core: Make EditorManager::reloadSettings available for tests
Needed for a test in ClangCodeModel in order to avoid a blocking pop-up
dialog.

Change-Id: I5a337cfcbf514052681f1941845a995d2a5856ac
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-03 08:59:06 +00:00
Eike Ziller
697479572f Move Open With... handling to editor manager.
Change-Id: I27faa327ae33244927e21aa74875d9601aaf9e50
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-06-02 07:00:50 +00:00
Eike Ziller
2e4a86a87c Simplify Open with... menu handling
In the light of lambdas we can get rid of some complexity.

Change-Id: Id28b52c42d7c34526c93785723387b6c44c0cd52
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-06-02 07:00:31 +00:00
Tobias Hunger
972a306d56 DocumentManager: Treat documents without path as temporary
Treat documents without path as temporary when trying to come up
with a directory to open the file dialog in.

Task-number: QTCREATORBUG-14131
Change-Id: I266fe6608b7c98b479f86412a0892413e1b99bb2
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-03-16 13:51:26 +00:00
Eike Ziller
5a3a940ad3 Use new mime database
Change-Id: I4305872b6b11ef3e8a364280ffa5209a5a793600
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-17 13:00:07 +00:00
Eike Ziller
9926fc2ab1 Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'
Conflicts:
	src/libs/utils/tooltip/tipcontents.cpp
	src/libs/utils/tooltip/tipcontents.h
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/baremetal/baremetalconstants.h
	src/plugins/baremetal/baremetaldevice.cpp
	src/plugins/baremetal/baremetaldevice.h
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.h
	src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h
	src/plugins/baremetal/baremetalplugin.cpp
	src/plugins/baremetal/baremetalplugin.h
	src/plugins/baremetal/baremetalruncontrolfactory.cpp
	src/plugins/baremetal/baremetalruncontrolfactory.h
	src/plugins/cppeditor/cppcodemodelinspectordialog.cpp
	src/plugins/cppeditor/cppdoxygen_test.cpp
	src/plugins/cppeditor/cppdoxygen_test.h
	src/plugins/debugger/breakpointmarker.cpp
	src/plugins/debugger/debuggeritemmodel.cpp
	src/plugins/debugger/debuggeritemmodel.h
	src/plugins/debugger/loadcoredialog.cpp
	src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp
	src/plugins/projectexplorer/addnewmodel.cpp
	src/plugins/projectexplorer/addnewmodel.h
	src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.h
	src/plugins/qmlprofiler/notesmodel.cpp
	src/plugins/qmlprofiler/qml/CategoryLabel.qml
	src/plugins/qmlprofiler/qml/MainView.qml
	src/plugins/qmlprofiler/qml/Overview.js
	src/plugins/qmlprofiler/qml/Overview.qml
	src/plugins/qmlprofiler/qml/TimeDisplay.qml
	src/plugins/qmlprofiler/qml/TimeMarks.qml
	src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.h
	src/plugins/qmlprofiler/timelinemodelaggregator.cpp
	src/plugins/qmlprofiler/timelinemodelaggregator.h
	src/plugins/qmlprofiler/timelinerenderer.cpp
	src/plugins/qmlprofiler/timelinerenderer.h
	src/plugins/qmlprojectmanager/QmlProjectManager.json.in
	src/plugins/texteditor/findinfiles.cpp
	src/plugins/vcsbase/vcsconfigurationpage.cpp
	src/shared/qbs
	src/shared/scriptwrapper/interface_wrap_helpers.h
	src/shared/scriptwrapper/wrap_helpers.h
	tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp
	tests/system/suite_debugger/tst_debug_empty_main/test.py
	tests/system/suite_debugger/tst_qml_js_console/test.py
	tests/system/suite_debugger/tst_qml_locals/test.py

Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
2015-02-12 17:29:21 +01:00
Orgad Shaneh
6102b2d697 Core: De-noise DocumentManager
Change-Id: I5b78e5ac76829a8921039663edab2b8f836c0c7e
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-11 08:53:12 +00:00
Orgad Shaneh
428565cb02 Core: Remove unneeded qualifications
Mostly done using the following ruby script:
Dir.glob('**/*.cpp').each { |file|
  next if file =~ %r{src/shared/qbs|/qmljs/}
  s = File.read(file)
  s.scan(/^using namespace (.*);$/) {
    ns = $1
    t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
      before = $1
      char = $2
      if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
        m
      else
        before + char
      end
    }
    if t != s
      puts file
      File.open(file, 'w').write(t)
    end
  }
}

Change-Id: I5c6690f51488bf8ca3610ba9fb11e6e5fd814aaa
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-06 09:06:18 +00:00
Orgad Shaneh
1bcfa137a3 Do not use QDir::separator() for internal paths
Internal paths are supposed to be normalized

Change-Id: Ic6943ce13ad389dfdb44054a9e6f03da8c6cd88d
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-02 08:32:59 +00:00
Orgad Shaneh
a9014e074d Utils: Use FileName in reloadPrompt
Change-Id: I170208e1c49bcab9c78b1651669252ed0d162bb3
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-02-02 07:02:59 +00:00
Daniel Teske
230be99474 Fix default wrong directory if no files are open in the editor
Task-number: QTCREATORBUG-13831
Change-Id: Iaeb11014ed16bc9f08d7c12d81c1b7b8a4163d21
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-01-19 13:34:10 +01:00
Daniel Teske
1ed12d39f1 Remove DocumentManager::currentFile, use DocumentManager::currentEditor
Change-Id: Ided1a14481cfbbcc49e901f3837e056582ff60e3
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-01-19 13:34:06 +01:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Orgad Shaneh
c6a983d271 Core: Use FileName for file path in IDocument
Change-Id: I85f7398aee59d0d36f0e5c3bf88ff3c96002e394
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-01-12 10:23:37 +01:00
Orgad Shaneh
7f34158041 Core: Cosmetics
* Remove redundant namespace qualifiers
* Qt5-ify some signal/slot connections
* Replace some using Core::Internal with explicit namespace scopes

Change-Id: Id1aae05e2c6fc2992c2716e1f8f9e985c6e56122
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-11-26 13:46:38 +01:00
Eike Ziller
3a8564c1f5 Fix reloading documents when they are changed fast, multiple times.
This can for example happen when doing interactive git rebases.

* When a file was changed after we reloaded it, but before we removed
+readded the watcher, we wouldn't get a notification for these changes.

* When we got a file changed notification while we were in checkForReload
(because of event processing of the dialog, or file loading), the
notification was dropped and only processes when a check was triggered
again (e.g. at window activation, or when some (other) file changed)

Change-Id: Iab1861a8f05c739a3405bc1afe90ae6f2145057b
Task-number: QTCREATORBUG-9745
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-11-13 15:26:51 +01:00
Friedemann Kleint
8fbd8c4105 Fix warning when saving documents with empty file names.
"QFileInfo::absolutePath: Constructed with empty filename"

Change-Id: Ib5d82681aafee54c309c2beb31c534a26e791737
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2014-11-12 15:49:34 +01:00
Daniel Teske
a8918db5f7 Make project dir default
The project dir defaults to the home directory.

Task-number: QTCREATORBUG-13366
Change-Id: I5a34ae458cacde9e12df50e0796ca7d236bb123e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2014-11-12 12:00:54 +01:00
Eike Ziller
ea27143239 Merge remote-tracking branch 'origin/3.2'
Conflicts:
	src/libs/utils/ipaddresslineedit.cpp
	src/libs/utils/logging.h
	src/plugins/analyzerbase/AnalyzerBase.pluginspec.in
	src/plugins/android/Android.pluginspec.in
	src/plugins/android/androiddeploystep.cpp
	src/plugins/android/androiddeploystep.h
	src/plugins/android/androiddeploystepfactory.cpp
	src/plugins/android/androiddeploystepwidget.cpp
	src/plugins/android/androidpackagecreationfactory.cpp
	src/plugins/android/androidpackagecreationstep.cpp
	src/plugins/android/androidpackagecreationstep.h
	src/plugins/android/androidpackagecreationwidget.cpp
	src/plugins/android/androidpackagecreationwidget.h
	src/plugins/android/javafilewizard.cpp
	src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in
	src/plugins/baremetal/BareMetal.pluginspec.in
	src/plugins/bazaar/Bazaar.pluginspec.in
	src/plugins/beautifier/Beautifier.pluginspec.in
	src/plugins/bineditor/BinEditor.pluginspec.in
	src/plugins/bookmarks/Bookmarks.pluginspec.in
	src/plugins/clangcodemodel/ClangCodeModel.pluginspec.in
	src/plugins/clangcodemodel/clanghighlightingsupport.cpp
	src/plugins/clangcodemodel/clangsymbolsearcher.cpp
	src/plugins/classview/ClassView.pluginspec.in
	src/plugins/clearcase/ClearCase.pluginspec.in
	src/plugins/cmakeprojectmanager/CMakeProjectManager.pluginspec.in
	src/plugins/cmakeprojectmanager/cmakeeditorfactory.cpp
	src/plugins/cmakeprojectmanager/cmakehighlighter.cpp
	src/plugins/coreplugin/Core.pluginspec.in
	src/plugins/cpaster/CodePaster.pluginspec.in
	src/plugins/cppeditor/CppEditor.pluginspec.in
	src/plugins/cppeditor/cppfilewizard.cpp
	src/plugins/cpptools/CppTools.pluginspec.in
	src/plugins/cpptools/cpphighlightingsupportinternal.cpp
	src/plugins/cpptools/cppmodelmanagerinterface.cpp
	src/plugins/cpptools/cppmodelmanagerinterface.h
	src/plugins/cvs/CVS.pluginspec.in
	src/plugins/debugger/Debugger.pluginspec.in
	src/plugins/designer/Designer.pluginspec.in
	src/plugins/diffeditor/DiffEditor.pluginspec.in
	src/plugins/emacskeys/EmacsKeys.pluginspec.in
	src/plugins/fakevim/FakeVim.pluginspec.in
	src/plugins/genericprojectmanager/GenericProjectManager.pluginspec.in
	src/plugins/git/Git.pluginspec.in
	src/plugins/git/gitorious/gitorious.cpp
	src/plugins/git/gitorious/gitorious.h
	src/plugins/git/gitorious/gitoriousclonewizard.cpp
	src/plugins/git/gitorious/gitorioushostwidget.cpp
	src/plugins/git/gitorious/gitorioushostwidget.h
	src/plugins/git/gitorious/gitorioushostwizardpage.cpp
	src/plugins/git/gitorious/gitoriousprojectwidget.cpp
	src/plugins/git/gitorious/gitoriousprojectwidget.h
	src/plugins/git/gitorious/gitoriousprojectwizardpage.cpp
	src/plugins/git/gitorious/gitoriousprojectwizardpage.h
	src/plugins/git/gitorious/gitoriousrepositorywizardpage.cpp
	src/plugins/git/gitorious/gitoriousrepositorywizardpage.h
	src/plugins/glsleditor/GLSLEditor.pluginspec.in
	src/plugins/glsleditor/glsleditorfactory.cpp
	src/plugins/glsleditor/glslfilewizard.cpp
	src/plugins/helloworld/HelloWorld.pluginspec.in
	src/plugins/help/Help.pluginspec.in
	src/plugins/imageviewer/ImageViewer.pluginspec.in
	src/plugins/ios/Ios.pluginspec.in
	src/plugins/macros/Macros.pluginspec.in
	src/plugins/mercurial/Mercurial.pluginspec.in
	src/plugins/perforce/Perforce.pluginspec.in
	src/plugins/projectexplorer/ProjectExplorer.pluginspec.in
	src/plugins/pythoneditor/PythonEditor.pluginspec.in
	src/plugins/pythoneditor/pythoneditorwidget.cpp
	src/plugins/pythoneditor/wizard/pythonfilewizard.cpp
	src/plugins/qbsprojectmanager/QbsProjectManager.pluginspec.in
	src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp
	src/plugins/qmakeprojectmanager/QmakeProjectManager.pluginspec.in
	src/plugins/qmakeprojectmanager/profileeditorfactory.cpp
	src/plugins/qmldesigner/QmlDesigner.pluginspec.in
	src/plugins/qmljseditor/QmlJSEditor.pluginspec.in
	src/plugins/qmljseditor/qmljseditorfactory.cpp
	src/plugins/qmljstools/QmlJSTools.pluginspec.in
	src/plugins/qmlprofiler/QmlProfiler.pluginspec.in
	src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec.in
	src/plugins/qnx/Qnx.pluginspec.in
	src/plugins/qtsupport/QtSupport.pluginspec.in
	src/plugins/remotelinux/RemoteLinux.pluginspec.in
	src/plugins/resourceeditor/ResourceEditor.pluginspec.in
	src/plugins/resourceeditor/resourcewizard.h
	src/plugins/subversion/Subversion.pluginspec.in
	src/plugins/tasklist/TaskList.pluginspec.in
	src/plugins/texteditor/TextEditor.pluginspec.in
	src/plugins/texteditor/basetexteditor_p.h
	src/plugins/texteditor/basetextmark.cpp
	src/plugins/texteditor/codeassist/basicproposalitemlistmodel.h
	src/plugins/texteditor/codeassist/defaultassistinterface.h
	src/plugins/texteditor/codeassist/iassistproposalitem.cpp
	src/plugins/texteditor/itexteditor.cpp
	src/plugins/texteditor/itexteditor.h
	src/plugins/texteditor/itextmark.cpp
	src/plugins/texteditor/plaintexteditor.cpp
	src/plugins/texteditor/plaintexteditor.h
	src/plugins/texteditor/texteditoractionhandler.cpp
	src/plugins/todo/Todo.pluginspec.in
	src/plugins/updateinfo/UpdateInfo.pluginspec.in
	src/plugins/valgrind/Valgrind.pluginspec.in
	src/plugins/vcsbase/VcsBase.pluginspec.in
	src/plugins/welcome/Welcome.pluginspec.in
	src/plugins/winrt/WinRt.pluginspec.in
	tests/auto/debugger/temporarydir.h

Change-Id: I254af8be8119fe9855287909e17d4b8ca9d2fc2f
2014-10-14 15:36:16 +02:00
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
hjk
111f65b518 Core: Reorganize ReadOnlyFilesDialog
Move exported class out of namespace Internal, but expose only a minimal
interface. Use Qt 5 connections, adjust callers and surrounding code.

Change-Id: I52b4156d78cd1ec42ec6c94994775ce74f24ebdc
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-09-25 18:06:47 +02:00
Erik Verbruggen
cc70b603d3 C++: Change QStringList to QSet<QString> to prevent conversions.
This eliminates a bunch of list->set->list conversions. Especially the
ProjectInfo::appendProjectPart takes lots of time converting for every
part added.

Change-Id: Ib3c8cd4b0ad6c012ccbeed12ebedd46b9b6cca95
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-09-04 15:59:40 +02:00
Tobias Hunger
34a61be27c DocumentManager: Reduce scope of variable
Detected by CppCheck run.

Change-Id: I2fb506b76757d2bd0a7a1c220a9cbe1d7f63a468
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-09-03 16:53:24 +02:00
hjk
6431ab2c79 Use Qt 5's QStringList::join(QChar)
Less typing and less cycles than join(QString) where appropriate

Change-Id: I6ebc0e17e4d7fd9845864dd95b7de4ba4dad6906
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-08-25 08:21:14 +02:00
Eike Ziller
ff60b856ec EditorManager: Clean up public interface
By moving internally used methods to EditorManagerPrivate

Change-Id: I046ce92b8baffe4bcd2ea0529557a3ae69f74338
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-07-22 17:28:30 +02:00
Eike Ziller
db918592ec Fix "Open with" for multiple splits
It was closing all existing editors and opening a single new one in the
"current" split.
Instead, open new editors in all splits where the file was open and
visible.

Change-Id: Iac7238077b2e42937ce54eea65fa1b61dcd07df1
Reviewed-by: David Schulz <david.schulz@digia.com>
2014-07-04 08:50:28 +02:00
Christian Kandeler
93304df038 Always pass Core::Id by value.
Currently we pass in some places by value, elsewhere by const ref and
for some weird reason also by const value in a lot of places. The latter
is particularly annoying, as it is also used in interfaces and therefore
forces all implementors to do the same, since leaving the "const" off is
causing compiler warnings with MSVC.

Change-Id: I65b87dc3cce0986b8a55ff6119cb752361027803
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-07-01 11:52:08 +02:00
Eike Ziller
2786250c17 Merge remote-tracking branch 'origin/3.1'
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/shared/qbs

Change-Id: Iba59e41db72e2afdf594f1f7003215d7d8d1e6d3
2014-06-13 10:51:51 +02:00
Eike Ziller
1fda462500 Avoid explicit checks for windows host when working with file paths
We have fileNameCaseSensitivity and withExecutableSuffix et al.

Change-Id: I79bd2cd57e258c3f15673a661a49bab597d7afa4
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-06-12 14:33:34 +02:00
Eike Ziller
6c473db097 Fix setting DocumentManager::currentFile when clicking into split
This broke when introducing delayed setting of the currentEditor when
the context changes. Simply move the logic from the document manager to
the editor manager, where it arguably belongs to anyway, and also set
the currentFile delayed in that case.

Task-number: QTCREATORBUG-12264
Change-Id: I67ee3f9a02e62cfa67671629c956a4290361cba8
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
2014-06-04 10:41:58 +02:00
Orgad Shaneh
c58cb2a4f0 Core: Pass const string by reference
Change-Id: Ic927334a04cf61bccede3179eee0ca679c5b998f
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-05-20 08:02:12 +02:00
hjk
6e584b5b49 DocumentModel: Make interface static
Move item model implementation to private, adjust user code.

Change-Id: Ifbe94e7c7b9b1e8be1b4c531958dbd7a9413af13
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-05-13 11:48:30 +02:00
Christian Kandeler
eccc1198d6 Use double quotes instead of single quotes as per our guidelines.
Change-Id: Ib608bb49e26781aef1914085a5d801fcdcd5eb56
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-04-22 10:06:40 +02:00