Commit Graph

170 Commits

Author SHA1 Message Date
Erik Verbruggen
3fa55b7ab9 Removed module names from #include directives.
Getting the #include directives ready for Qt5. This includes the
new-project wizards.

Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-15 16:24:46 +01:00
Daniel Teske
854fbd1e41 Rename SessionManager::clear() to closeAllProjects()
Also move the editor closing out of the function. It isn't needed on
shutdown as all editors are already closed then.

Change-Id: Ie50a238e0a0382a99b0a267b286f9ed9484f26f6
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-13 13:33:37 +01:00
Daniel Teske
accb0040ed SessionManager::loadSession inline impl functions and rewrite
The order of actions and thus the state at which the signals are emitted
has changed. The aboutToUnloadSession comes before the actual saving
now. Also the aboutToLoadSession is after restoring values but before
restoring projects and editors.

Change-Id: I3eae66cffae970f00535d8d6e2bb11a6ca645456
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-13 13:28:54 +01:00
Daniel Teske
d2c6adb93a Remove SessionFile
Finally one unecessary layer is gone

Change-Id: I34ec37ab898884def075a86e7dfd978e3244d2e3
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-07 15:52:04 +01:00
Daniel Teske
c200a9262f Move SessionFile::future to SessionManager
Instead of reseting the variable at new SessionFile, I did it at the
right place, that is after reportingFinished().

Change-Id: Ia5b58734a646840ff645dad07dd87a2bffcef02b
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-07 15:51:58 +01:00
Daniel Teske
27275a0748 Move SessionFile::m_values to SessionManager
Change-Id: Iccb40a16d3087f612ad5d570ed42a243fe87dfe5
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-07 15:01:08 +01:00
Daniel Teske
24c7a7bbf6 Move SessionFile::m_depMap to SessionManager
Note: The m_dep.clear() calls on new SessionFile are theoretically
unecessary. After SessionManager::clear(), m_depMap should be empty.
I can't prove that easily though, so I'll remove that later.

Change-Id: I50b36ca7578dccb50b2b2d81351c8e2d1f0826cd
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-07 15:00:57 +01:00
Daniel Teske
3aacf0ee60 Move SessionFile::m_failedProjects to SessionManager
Change-Id: Ic030e6ac521728431ee17b2e69e7d5aaa30b1fc3
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-07 15:00:52 +01:00
Daniel Teske
739ab0be74 Move SessionFile::m_projects to SessionManager
Note: We do not need to clear it on delete m_file; new SessionFile,
since the clear() before that removes all projects from m_projects

Change-Id: I800f52939602cc2c02deff993da578e28ad9115c
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-07 15:00:44 +01:00
Daniel Teske
af621d0852 Move SessionFile::m_startupProject to SessionManager
Preserve the exact same semantics, that is set it to 0 even if it is
later overriden anyway. Note, this 0 setting prevents the startup
project changed signal from being emitted, so it's likely to be wrong.
I'll fix that later.

Change-Id: I8efc33e54fca1fe3636006fe8616ae20aa8c211b
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-07 15:00:38 +01:00
Daniel Teske
2ffc2c3b9a Move SessionFile::sessionLoadingProgress to SessionManager
Another step towards removing SessionFile.

Change-Id: I63ff5bd1c62d03e362e33c0ed65bf7bf3d7d0d6f
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-07 15:00:30 +01:00
Daniel Teske
cd98f05f0c Simply SessionFile::m_failedProjects handling
Remove the functions and access the variable directly.

Change-Id: Ic35d971a618299b6ccf26f9fb0d76de498268cc1
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-07 15:00:24 +01:00
Daniel Teske
742656df89 Inline SessionFile::load() into SessionManager::loadImpl
Another step towards removing SessionFile.

Change-Id: I0d3f7e9de3fbdf49ecc5e5d033128cb29a14538b
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-07 15:00:15 +01:00
Daniel Teske
95896242de Simplfy logic in SessionManager::loadImpl
Removing the bool success makes later refactorings easier to do. The
code flow is the same, except that the block handling failedProjects
after load was always run, even if SessionFile::load returned false.
The only place SessionFile::load returns false failedProjects didn't yet
change, so the code was wrong before.

Change-Id: I8ce565791d67ece7ab8fc7c4a799ed365153e34b
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-07 15:00:01 +01:00
Daniel Teske
8b519d5ebc Inline SessionFile::save into SessionManager
I want to get rid of SessionFile, this is the first step.
Only slight coding style reformating has been done.

Change-Id: I57cae8356b9f12229e3f788f2e71f8e1161fc3c7
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-07 14:59:50 +01:00
Daniel Teske
bd5a7d684f SessionFile: Remove m_fileName
It's easily constructed from sessionName, thus removing one member

Change-Id: I8ae92db0732dada6baa7b50ec84d7b95a16efed6
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-07 14:59:40 +01:00
Daniel Teske
040c0593f2 Remove SessionFile::fileName
Only called in debug output, which is going to change later anyway

Change-Id: I7dd6ec4a30a5d98eeab82cf46276c2811dc0207c
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-07 14:59:33 +01:00
Daniel Teske
a92830e37a SessionFile::fileName can't return a empty filename
So remove code that checks for that

Change-Id: I6e717f27713fae0b7487e18a45790b82e4e1e8cd
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-07 14:59:24 +01:00
Daniel Teske
c59bf4b402 Move creating of the default session into the SessionManager ctor
There used to be 3 states for the SessionManager:
1) Uninitialized (after ctor)
2) A default virgin session
3) Using a session (including the default session)

And we used to switch from state 1 to 2 or 3 after ICore::coreOpened().
This changes that we start in state 2 and thus don't emit a few signals
after coreOpened. I don't think that'll break anything.

Change-Id: I4cf7dade132c9d0ebd6d472d79c8b70c07acd20f
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-07 14:59:03 +01:00
Daniel Teske
da34e80ede SessionManager: Inline and remove updateName
It's only ever called two times and makes it easier to understand how
m_sesionName is changed

Change-Id: I0106516b78481181d7a027a6348eee45e0e462d6
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-03 12:09:29 +01:00
Daniel Teske
b7a76cd7a8 Fix overriding the default session
To reproduce the bug:
1) Load a project into the default session.cpp
2) Close creator (which saves the session)
3) Start Creator
4) Create a new session and switch to it => This calls createImpl
   and overrides the default session, even though it shouldn't
5) Load the default session, which will now be empty

Change-Id: I7c23fba8c1f9fd32cc95b3b9206afc422c1f0133
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-03 12:09:15 +01:00
Daniel Teske
9ac92e6fad Remove class SessionNodeImpl, just use SessionNode directly
The class added nothing over SessionNode.

Change-Id: I137c274514b2c5897a591b7e093ba84e1a91e9d7
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-01-31 16:03:25 +01:00
Daniel Teske
53ffa9c676 Remove SessionManager::currentSession
It returns the same as activeSession

Change-Id: I244747eddcca3fda181eb8dc52b1b616beba212e
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-01-31 15:52:12 +01:00
hjk
2df4cb21fe Core::ModeManager: make some functions static
Change-Id: I5c1275ba3f596d8911fd2e4404181bf57b58f494
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-01-27 14:52:24 +01:00
hjk
2931a499e6 Long live the king!
Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-26 19:55:36 +01:00
hjk
b0b105d575 ProjectExplorer: make currentProject static
This saves one function call compared to the instance()->currentProject()
pattern and is typically less to type on the caller site.

Change-Id: I65568f30205fc90e2aaca7e8e7f0192241df8c85
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-24 19:20:13 +01:00
hjk
4a21f0c3c8 Use new static ICore interface.
Change-Id: I9b690d9b150c8d162b15370f9f8986267c9128f1
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-24 18:48:47 +01:00
Daniel Teske
f539bfa3f4 Remove dependencies on unloadeable projects
Task-number: QTCREATORBUG-6736

Change-Id: Icff1857a1bf44f2f2bad106c3fce8bdd3a2d2e49
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-01-11 13:37:15 +01:00
Friedemann Kleint
ced6fc4136 ProjectExplorer: Compile with QT_NO_CAST_FROM_ASCII.
- Add missing translations
- Remove some unneeded conversions.

Change-Id: Ia30e5c838099e52a9f38ca4854395c10c0391075
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-09 16:45:08 +01:00
Leandro Melo
9e56781b5b Proj. explorer: Adjust order of load/unload signals
This tries to fix inconsistencies concerning the order of some signals
and the corresponding state of the sessions. In particular, it now emittes
aboutToLoadSession *after* aboutToUnloadSession. Also, retrieving the
active session name gives the correct result when updating project files.
In addition, there's a new parameter to aboutToLoadSession which describes
the session being loaded.

Change-Id: Iab5fb21080a7ee9bbf9f4d8958499cbc5549e81e
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2011-11-11 12:59:54 +01:00
Eike Ziller
85cf2b661e Merge remote-tracking branch 'origin/2.4'
Conflicts:
	src/libs/qmljs/qmljsinterpreter.cpp
	src/libs/qmljs/qmljsinterpreter.h
	src/plugins/debugger/qml/scriptconsole.cpp
	src/plugins/git/gitplugin.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas_p.h

Change-Id: Iad59c8d87c72a21c79c047e374c0ab689998af39
2011-11-11 09:46:25 +01:00
Leandro Melo
4528b19b40 Proj. explorer: Remove dead code
Change-Id: I5375eeac89b92d2d3938feadd7e9017aae3749e5
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2011-11-10 15:47:57 +01:00
hjk
31600758de all: s/info@qt.nokia.com/qt-info@nokia.com/
Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-11-03 10:33:19 +01:00
Jarek Kobus
2244911826 Implement Code Style schemes
Task-number: QTCREATORBUG-5092

Change-Id: I218cef02f7c242e4dfae59b1b8021ea618e60d07
Reviewed-on: http://codereview.qt-project.org/5160
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-09-23 10:23:15 +02:00
hjk
e684960523 core: remove usages of Core::ICore::instance()->modeManager()
The function is still there but should be remove in my opinion.

Change-Id: I739fe942e74f459faccb80b5bcb8a5721c6bb9bf
Reviewed-on: http://codereview.qt.nokia.com/4200
Reviewed-by: hjk <qthjk@ovi.com>
2011-09-05 15:23:45 +02:00
Daniel Teske
4e41308a0f Better error feedback on Open project
Task-Nr: QTCREATORBUG-5996
Task-Nr: QTCREATORBUG-5995

Change-Id: I4184a1c652cbfc93a788a8f9b67d936401e197b9
Reviewed-on: http://codereview.qt.nokia.com/4197
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2011-09-05 15:10:01 +02:00
Daniel Molkentin
22d6dfa45a Welcome Screen: Fix regressions
- last session / current session semantics is back
- Manage Sessions... button is back

This commit changes the behaviour of currentSession()
to return the session name and not the full path.
SessionNodeImpl as the other user has been adjusted
accordingly.

Change-Id: I1dcfbef2fb4dacf3e3906871d816483c2bfb76da
Reviewed-on: http://codereview.qt.nokia.com/1461
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-07-12 11:24:31 +02:00
Christian Kamm
779fafcbfe Make C++ code style configurable.
Change-Id: Iaf08edb2361146e6b5e1cbafdb716a23c938875b
Done-with: Jarek Kobus
Task-number: QTCREATORBUG-2670
Task-number: QTCREATORBUG-4310
Task-number: QTCREATORBUG-2763
Task-number: QTCREATORBUG-3623
Task-number: QTCREATORBUG-567
Reviewed-on: http://codereview.qt.nokia.com/74
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-05-24 12:45:07 +02:00
Tobias Hunger
aa2acec14c Fix/add copyright headers
Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
2011-05-06 15:17:05 +02:00
Tobias Hunger
f068084083 Do not override mouse cursor needlessly
Task-number: QTCREATORBUG-3822
2011-05-04 11:15:11 +02:00
Oswald Buddenhagen
45c9cf7a12 add/unify i/o error handling
lots of use of Utils::FileSaver and Utils::FileReader

Task-number: QTCREATORBUG-1619
2011-04-18 14:10:14 +02:00
Friedemann Kleint
fcdc8177b1 Documentation: Add ProjectExplorer plugin..
Reformat existing documentation to qdoc.
2011-04-14 12:58:14 +02:00
Oswald Buddenhagen
dc3c156cac Merge branch '2.2'
Conflicts:
	src/plugins/debugger/gdb/pythongdbengine.cpp
	src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.cpp
	src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.h
	src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.cpp
	src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.h
	src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurations.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
	src/plugins/qt4projectmanager/qt-maemo/qt4maemotargetfactory.cpp
	src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.cpp
	src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp
	src/plugins/qt4projectmanager/qt4target.cpp
	src/plugins/qt4projectmanager/qt4target.h
	src/plugins/qt4projectmanager/qtoptionspage.h
	src/plugins/qt4projectmanager/qtversionmanager.cpp
	src/plugins/welcome/welcomemode.cpp
2011-04-14 12:39:31 +02:00
hjk
8397663964 Update license. 2011-04-13 11:49:28 +02:00
dt
c6e0499026 Sessions: Store expand/collapsed state of project tree
Task-Nr: QTCREATORBUG-3161
And related to
Task-Nr: QTCREATORBUG-1796
2011-03-25 16:50:21 +01:00
dt
919acf5786 ProjectExplorer: Move dependencies update a little further up
Task-Nr: QTCREATORBUG-4168
2011-03-21 18:28:55 +01:00
dt
9901dbd1d6 SessionManager: emit sessionLoaded after actually changing activeSession
Also make use of that signal for the welcome page
Task-Nr: QTCREATORBUG-4034
2011-03-11 13:12:37 +01:00
Leandro Melo
ea313f3ec8 Text editor: Introduce per project settings
With some refactorings to make the code look better.

Reviewed-by: con
2011-02-21 17:22:24 +01:00
dt
3278d6c77c Session Manager: Simplfy code 2011-01-19 15:47:00 +01:00
con
d1023c7614 It's 2011 now.
Reviewed-by: hjk
2011-01-12 09:46:24 +01:00