Commit Graph

294 Commits

Author SHA1 Message Date
hjk
e94526100c Core: Delay coreOpened signal emission
This prevents some window restoring flickering.

Change-Id: Iead0e0f2129b969e1de7e22dbf15e641740e40e1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-02-27 16:01:41 +01:00
Eike Ziller
c5cc4b1f13 Shortcuts: Remember them even for plugins that are not loaded
This also fixes the issue that shortcuts of designer integration gets
lost if it doesn't get initialized.

Task-number: QTCREATORBUG-4264
Task-number: QTCREATORBUG-11399
Change-Id: Ieb4fe5fd345e69aa62403e4578fa6028400aff6f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-02-26 16:10:12 +01:00
Orgad Shaneh
16a957eb1b MainWindow: Delay restoreWindowState even more
When opening a core dump using command-line, the window still appears as
"fake maximized"

Change-Id: Ifdd9b58df1506de73357b9c3722bf6f3eaa3a1de
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-02-26 13:23:02 +01:00
Eike Ziller
b03a981a41 Merge remote-tracking branch 'origin/3.0'
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/shared/qbs

Change-Id: Ic6f115e3d9da32327cfe2d02d7356687dc3f60d7
2014-02-11 09:14:22 +01:00
Orgad Shaneh
c5febb4490 Core: Save silently on Save All
Change-Id: I3e9be877c79eca5e1921e725ec092727af12b7a5
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-01-27 09:42:44 +01:00
Kai Koehne
fd75b0888a Put "Technical Support", "Report Bug..." in a separate menu group
This allows other plugins to add actions here.

Change-Id: Id5b751bf719533842ba426ecdb4f98c43a73755b
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-01-24 14:19:46 +01:00
Tobias Hunger
88a4421a84 DocumentManager: Refactor saveModified methods
Introduce methods to save a document/list of documents/all documents,
both silently and with a dialog to the DocumentManager.

All of these return a bool that signifies whether the save was
successful or not.

Detailed information on which files failed to load or whether the
save was canceled by the user are still available as optional
in/out parameters.

Change-Id: Id17798302f2a8ba6b85a07c1f0b91f03b20da03f
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-01-23 13:50:29 +01:00
Orgad Shaneh
a97b449f2b MainWindow: Delay restoreWindowState
QLayout calls setMinimumSize, which breaks maximized state on Windows.

Task-number: QTCREATORBUG-9586
Change-Id: Ibd9ceb8bccbdf26c6369e86ad4918835d645ca1e
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-13 11:51:08 +01:00
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
Tobias Hunger
ded911516b Revert "MainWindow: Delete navigationwidget again"
This causes trouble with the unit tests on windows.

This reverts commit 0fe28d652f1219978d23030cbb322d09ada5a68f

Change-Id: I08d4991d9b86ee8b80d093899f2e33e2be1c1565
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-11-28 11:10:21 +01:00
Tobias Hunger
9055470884 MainWindow: Delete navigationwidget again
Change-Id: I4eecb9b93b4c490ea788da8c068a9a9fb9c3ac94
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-11-27 10:29:48 +01:00
hjk
527046acc2 MessageManager: General cleanup.
Apply 'static' pattern, rename 'printToOutputPane' to 'write'

Change-Id: I6f31f1a8c914661e2a2182c0b6256b41ead28de7
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-09-05 12:51:00 +02:00
hjk
98917598d3 ProjectManager: Use Core::Id for progress types
Change-Id: I72993fda50ad70ad2d7c2f449923ac6e34b9e737
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-04 14:59:06 +02:00
Tobias Hunger
acd5e135f1 Mainwindow: Remove accessors for mimedatabase and vcsmanager
Fix fallout of those changes.

Change-Id: Ie90a8d3a9eb0a171ea5b4036f99298badf0302fc
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-09-03 12:12:36 +02:00
Tobias Hunger
451637a697 Mainwindow: Remove code commented out since 2008
Change-Id: Idab2836dc2a0c41c9feffd52a6c0d66846c1be2f
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-09-03 12:09:03 +02:00
Christian Kandeler
72d173829c Remove superfluous include paths from project files.
A lot of our build system files specify unneeded include
paths. These roughly fall into the following categories:
    a) Paths that are already set in more general files
       such as qtcreator.pri.
    b) Paths that serve no purpose at all, possibly
       left over from earlier versions of the project.
    c) Paths that act as workarounds for wrong include
       statements of the form '#include "xyz.h"', where
       xyz.h is not in the same directory as the including
      file.
This patch removes such path specifications and fixes the offending
include statements from case c).
Tested on Linux, Windows and OSX with qmake and qbs.

Change-Id: I039a8449f8a65df0d616b4c08081145c18ae4b15
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-02 17:28:17 +02:00
hjk
e68291e025 Core: Remove MainWindow::editorManager() accessor
Change-Id: Ic22cb1b0313ba51fa144b31117c6b005da0a4bff
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-02 12:42:26 +02:00
hjk
25cde41ea6 Core: Remove unused functions from MainWindow
Change-Id: I4f399aa01fc1ef27e35d759ccc74584b8df1ca07
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-02 12:42:20 +02:00
hjk
71affce4e4 ModeManager: Force use of static interface
Change-Id: I314ca347fd0fad30bf5ac6a6d4c67db8e5687065
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-30 13:30:29 +02:00
Orgad Shaneh
ad9e7ccab6 Fix coding style for else statements
Change-Id: I1309db70e98d678e150388c76ce665e988fdf081
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-17 11:11:25 +02:00
Eike Ziller
4a596c8eee Remove script manager and script debugger engine.
Doesn't really serve a purpose any more.

Change-Id: I8c3bc11bf7b05a15eafd2a22456a40b270cefadf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-01 12:01:11 +02:00
Eike Ziller
2f8f083b40 Unify pattern used for privates and constructors
In the 'managers' from ICore

Change-Id: Iab98c9e0947b759843a62e3777ba46be3b304b06
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-07-01 11:52:35 +02:00
Eike Ziller
84b8c1f721 Adapt the escape key logic for external windows.
Change-Id: I294ba18e8ca91060e5d0ef8f81885642e045a975
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-06-25 14:58:37 +02:00
Eike Ziller
7c8db79817 Switch less often to edit mode
This change
* Removes IMode::type, ModeManager::activateModeType, and
  IEditor::preferredModeType, and adds IEditor::isDesignModePreferred
  instead
* Adapts the mode switching code in EditorManager to handle multiple
  windows, for example switching to edit mode should only happen if
  the editor/view is in the main window. Otherwise the editor window
  should be raised and focused
* Renames EditorManager::NoActivate --> DoNotChangeCurrentEditor
* Reverts the EditorManager::ModeSwitch logic to switch mode or
  make the current editor visible by default, introducing
  DoNotMakeVisible flag instead
* Fixes a few instances where EditorManager::ModeSwitch should have been
  used

One non-trivial problem left: If you open a .ui file and switch to an
external editor window, edit mode is activated, because the current
editor no longer is a .ui file, which means that the design mode gets
deactivated.

Change-Id: I76c5c2391eb4090143b778fb103acff3a5a1ff41
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-06-05 09:43:14 +02:00
Eike Ziller
c31c5612ab Allow nested IContexts and use it to give extra editor windows a context
The extra editor windows need to have editor manager context, otherwise
shortcuts (like ctrl+tab) do not work in them if e.g. projects mode is
active. Doing this via add/removeAdditionalContexts would be non-trivial
and error prone, so adding a context to the extra window is more
convenient. Since editors themselves already define a context, we need
to allow nesting of contexts.

Change-Id: I244eca53ebd665fd4d8fe7531e8ff701ed0b40b2
Reviewed-by: David Schulz <david.schulz@digia.com>
(cherry picked from commit deff0eb3c7)
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-05-21 15:07:14 +02:00
Eike Ziller
2bfcb47d63 Add an action to show/hide the mode bar on the far left.
Change-Id: If7a74eed7fc77b1d0fd5e4045671b3767fe2d7a2
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
(cherry picked from commit bde0627e59)
2013-05-21 15:07:03 +02:00
Eike Ziller
65ce453c4e Add split in new window action for editor views.
A few details are still to be done:
- extra windows are not restored yet
- window title of extra windows should show information about current
  editor
- the "raise main window" hack for Linux doesn't work with Qt 5

But it should already now be quite usable.

Change-Id: I638583ee4b2abe32e95c261bdf31b4a10b472748
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-05-08 13:07:05 +02:00
Eike Ziller
38b61177f6 Merge remote-tracking branch 'origin/2.7'
Conflicts:
	share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp
	share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h
	tests/auto/treeviewfind/treeviewfind.pro

Change-Id: I1ec788373656c947b50d72df6c26c91312469692
2013-04-23 11:13:25 +02:00
Gabriel de Dietrich
79428126e4 Set NoRole menu role on toggle fullscreen action
Again, since the default menu role is TextHeuristicRole, and when we
enter fullscreen the text is set to "Exit Full Screen", the Mac QPA
menu item syncing will assign this to be the quit menu item.

This would cause two problems. First, pressing Cmd-Q in fullscreen would leave
fullscreen mode instead of quitting the app. Second, that would make the quit
menu item to be hidden when leaving fullscreen, since the toggle fullscreen
action text would change back to "Enter Full Screen", and the make a round
trip to the menu item heuristic logic.

Task-number: QTBUG-30654
Change-Id: I7524c54c3bd77cce891c57292825f02e163fd7fa
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-04-19 16:23:22 +02:00
Eike Ziller
5a3dfb767f Move progress indicators out of mode bar.
This both allows the mode bar to be hidden optionally, and can give the
progress information a bit more room (e.g. for titles).

Progress information can either be shown in "pop up" windows in the
lower left corner of the main window (hiding window contents below),
or in a summary progress bar in the bottom right corner of the status bar.
Hovering the summary progress bar temporarily pops up the detailed
progress information. Keyboard can be used to switch between the two
views.

Change-Id: Ic6d6ab4fd43906e84b480c8ddf8eae5f5852e1f3
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-04-09 15:50:25 +02:00
Friedemann Kleint
cf5e615f6d Clean headers in Core-plugin.
Change-Id: Ie79d334765ca5c6a034fa2f5eccff5d45b481975
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-03-27 09:31:54 +01:00
Orgad Shaneh
14e35b5dc4 Client: Block until editor is closed
Change-Id: I06bd4425008103be3a4c8f64b6dff8f7df30c552
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-03-15 12:24:52 +01:00
Christian Kandeler
17765de169 Core: Remove unneeded ifdefs.
Replace compile-time checks for host OS by run-time checks.

Change-Id: I9f237389171586786c2609f81314bcb1bc17b01e
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-03-15 10:00:08 +01:00
Fawzi Mohamed
bf73aac39f coreplugin/mac: set menu role before adding menu
improves menu behaviour for qt5 on osx

Task-number: QTCREATORBUG-8152
Change-Id: I6ff7703d45ff5e250c7fae9a8c85f8d8ef078e16
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-02-27 09:50:09 +01:00
Eike Ziller
9e1d58e4db Don't change context if focus widget parent hierarchy doesn't define one
We now keep the current context if the focus is set on a widget with a
parent hierarchy that doesn't define one. This way, toplevels without a
context, like popup windows without parent, will keep the behavior from
before other toplevels could define contexts at all
(2118d542e6)

Task-number: QTCREATORBUG-8667
Change-Id: I8dd04d1f97f6ced10f8fa4269bc91457211396ca
Reviewed-by: David Schulz <david.schulz@digia.com>
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
2013-02-25 16:22:32 +01:00
Oswald Buddenhagen
1fda2111d4 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
	src/plugins/qmldesigner/designercore/include/widgetqueryview.h
	src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h
	src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
	src/plugins/qnx/bardescriptormagicmatcher.h
	src/plugins/qt4projectmanager/profilekeywords.cpp
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h

Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
2013-01-31 16:25:33 +01:00
Robert Loehning
298531e370 Incremented year in copyright info
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-29 16:27:03 +01:00
hjk
3475d55fd9 Core: Use Id in Context instead of plain int.
Change-Id: Iaa8e48459fb19b7d3b8821d0374925d0c6a7e0cc
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-01-12 02:33:31 +01:00
hjk
fd1302995c Core: remove some unused context handling functions
Change-Id: Ib92a2044ff84108416d315aaf68602b2dd41c7eb
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-01-12 02:30:54 +01:00
Orgad Shaneh
29a93998df Remove braces for single lines of conditions
#!/usr/bin/env ruby

Dir.glob('**/*.cpp') { |file|
  # skip ast (excluding paste, astpath, and canv'ast'imer)
  next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
  s = File.read(file)
  next if s.include?('qlalr')
  orig = s.dup
  s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
    res = $&
    if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
      res
    else
      res.gsub!('} else', 'else')
      res.gsub!(/\n +} *\n/m, "\n")
      res.gsub(/ *{$/, '')
    end
  }
  s.gsub!(/ *$/, '')
  File.open(file, 'wb').write(s) if s != orig
}

Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-08 10:48:18 +01:00
hjk
1863bfebdb Cleanup SettingsDialog
Change-Id: Ibbbf7d507e28201c2e7e466ab24b39e9e0e44fb4
Reviewed-by: hjk <qthjk@ovi.com>
2012-12-29 19:08:09 +01:00
hjk
e833b794b3 Use Core::Id in ICore::showOptionsDialog
Change-Id: I3865fde2347d687a7dee76dd5ca62db69cc4dd04
Reviewed-by: hjk <qthjk@ovi.com>
2012-12-29 19:04:30 +01:00
hjk
82f9de4af0 Use Core::Id for settings category in showWarningWithOptions
Change-Id: Ie296816c271efabfb7a046c176bc33ebde6f6454
Reviewed-by: hjk <qthjk@ovi.com>
2012-12-29 19:03:21 +01:00
Eike Ziller
2118d542e6 Allow external windows to define contexts for Qt Creator.
Task-number: QTCREATORBUG-5070

Change-Id: Ia466b73eb37bb8aef6f71ab8f1d990b40b43cac3
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-11-30 12:16:31 +01:00
Orgad Shaneh
1cba4a5af3 Core: Build with QT_NO_CAST_FROM_ASCII
Change-Id: If8e5d9ce875f8467a7699b791e5ec962baf8ff38
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-21 08:32:35 +01:00
Christian Kandeler
56ffd3c415 Core: Remove some unneeded ifdefs.
Change-Id: I90bcb0c05224d7ee9464ab1b22600ee2aba4c0ac
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-11-09 11:04:11 +01:00
Thomas Hartmann
e082b0f5e1 compile fix
Change-Id: Ic854161a3104349656fbb3035daeb4adb4e79ba9
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-10-23 13:10:17 +02:00
Thomas Hartmann
e629a91fb3 Remove dependencies on Plastique and Cleanlooks
We want to move these styles out of the library so
we should not depend on them in creator.

This patch reverts 63cacc4534,
since it does not rely on ifdefs.

See also 5d0f7d2304 in master.

Change-Id: I8a3762f9bc31c679067ebb0a6b5540bc18e8b836
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-10-23 11:33:28 +02:00
Jens Bache-Wiig
5d0f7d2304 Remove dependencies on Plastique and Cleanlooks
We want to move these styles out of the library so
we should not depend on them in creator.

Change-Id: I5326285d880c5e85d8d5ccdeca36fba30cf53ae0
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-10-19 15:48:11 +02:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00