Commit Graph

282 Commits

Author SHA1 Message Date
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
Nikolai Kosjar
ed86a7ca58 Get rid of some Q_WS_X11.
This macro isn't defined in Qt5 anymore, so use Q_OS_* where
appropriate.

Regarding bug QTCREATORBUG-7936:
Now the fonts look normal again on GNU/Linux, e.g. in the text editor
and the application/compile output pane.

Task-number: QTCREATORBUG-7936
Change-Id: I501cca608f273789d095e1138b32c2c8c38b0059
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-04 08:00:26 +02:00
hjk
08cc1e7d6a historycompleter: make key explicit
Change-Id: I1560e379639a02a2decf46c4e6b015bd6042c6b7
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-23 14:59:14 +02:00
Tobias Hunger
a68352f013 Change configuration saving
* Save initial configuration after all the plugins are done with
  their delayed initialization

* Save configuration when the autosave timer triggers. The disks
  are in use at that time anyway and saving can be turned off
  completely

* Save settings when closing the options page dialog

Change-Id: Idcf9ad61e8f9b94899c580d5a855a883a62f8dc0
Reviewed-by: Majid Khan <mkhan3189@gmail.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2012-08-20 17:19:25 +02:00
Eike Ziller
e0e8cf3ada Contact -> qt-project.org
Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-19 13:23:21 +02:00
Eike Ziller
e3c354d8f2 Make PluginManager mostly static.
Change-Id: Ib938aa4999c7c418a82304c5cca2e8748ef9d228
Reviewed-by: hjk <qthjk@ovi.com>
2012-06-19 16:11:40 +02:00
Eike Ziller
cdd44befff Add ActionContainer::addSeparator(...)
Gets rid of a lot of code duplication.

Change-Id: I2ce38fb38a0b61cb821e0bdc7bcc9a7ccdf9da72
Reviewed-by: hjk <qthjk@ovi.com>
2012-06-05 15:19:30 +02:00
Eike Ziller
b7c34292f4 Merge remote-tracking branch 'origin/2.5'
Conflicts:
	tests/system/objects.map

Change-Id: Ie6aed14f2f61111d26498ff3684ea4a57e6da59e
2012-06-01 14:06:24 +02:00
Daniel Teske
a97d144a33 Start auto save session timer later and let it occur more then once
Fixes regressions introduced by f059018a8e

Change-Id: I9d590580a9d36ac6980a6d170a119ebe33819262
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-06-01 12:07:06 +02:00
Eike Ziller
3934347fe9 ActionManager API cleanup.
d-pointer instead of inheritance
static methods

Change-Id: I7b2f0c8b05ad3951e1ff26a7d4e08e195d2dd258
Reviewed-by: hjk <qthjk@ovi.com>
2012-05-25 10:08:24 +02:00
Eike Ziller
1781617f8e Get rid of lots of ifdef Q_OS_MAC for shortcuts.
Using a central enum now.

Change-Id: I20d88c9a3f8c62cf33e4b89a3442269f71918b06
Reviewed-by: hjk <qthjk@ovi.com>
2012-05-23 13:47:13 +02:00
Eike Ziller
d8a0b025b4 Remove dead code.
Change-Id: I693fa221027a10c739bde0d27813a57fefbf836f
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-05-16 14:10:46 +02:00
hjk
21bf0046c3 editormanager: simplify use of interface
Less code on the user side, same meaning.

Change-Id: I14e54a5d2ed8e024a51cce74eaf7c8419ad544be
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-05-11 13:51:14 +02:00