Commit Graph

243 Commits

Author SHA1 Message Date
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
hjk
3b84a6dc88 Use ICore::dialogParent for message boxes without parent so far
Change-Id: I2ee35796b2c041e6ea2ae6bd677e10167451d1b8
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-03-12 12:06:10 +01:00
Tobias Hunger
02b3a79c5f VCS: Open diff/blame editors in other split
... if there are other splits that is.

Task-number: QTCREATORBUG-11623
Change-Id: Icb3b1c86c39d88e90916079e8ab347574ae9a361
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-03-07 16:02:14 +01:00
Tobias Hunger
c9b6897e78 EditorManager: Add OpenEditorFlags to openEditorWithContents
This requires moving the activateEditor call into openEditorWithContents.

Remove that line elsewhere when editors are constructed. Keep it when
reusing an existing editor though.

Change-Id: I872f03e16fde42f3b8adec2cf2344b7cc495cd08
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-03-07 15:56:43 +01:00
Eike Ziller
355f104d0e BaseTextEditor: Remove some unnecessary indirections through widget
Change-Id: I4f71448d6788a4e553b1495b72263a004e65d8c0
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-01-14 09:05:06 +01:00
hjk
4d96fa7aba Core: Merge Find and Locator into Core plugin
Change-Id: I7053310272235d854c9f409670ff52a10a7add8b
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-01-14 07:43:00 +01:00
Eike Ziller
236ea9efb9 Merge remote-tracking branch 'origin/3.0'
Conflicts:
	share/qtcreator/debugger/dumper.cpp
	share/qtcreator/debugger/dumper_p.h
	share/qtcreator/debugger/test/main.cpp
	src/plugins/debugger/gdb/classicgdbengine.cpp
	src/plugins/debugger/gdb/pythongdbengine.cpp
	src/plugins/debugger/lldblib/guest/lldbengineguest.cpp
	src/plugins/debugger/lldblib/guest/lldbengineguest.h
	src/plugins/debugger/lldblib/guest/main.cpp
	src/plugins/debugger/lldblib/ipcengineguest.cpp
	src/plugins/debugger/lldblib/ipcengineguest.h
	src/plugins/debugger/lldblib/ipcenginehost.cpp
	src/plugins/debugger/lldblib/ipcenginehost.h
	src/plugins/debugger/lldblib/lldbenginehost.cpp
	src/plugins/debugger/lldblib/lldboptionspage.cpp
	src/plugins/qbsprojectmanager/qbsstep.cpp
	src/plugins/qbsprojectmanager/qbsstep.h
	src/plugins/qmlprofiler/canvas/qdeclarativecanvas.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativecanvas_p.h
	src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativecontext2d_p.h
	src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp
	src/plugins/qnx/blackberrycheckdevmodestep.cpp
	src/plugins/qtsupport/debugginghelper.cpp

Change-Id: Ie9fd0a885fb6264a6a8a72daee071b75bcbd2e9d
2014-01-08 11:01:06 +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
Eike Ziller
0279661122 VCS: Remove unnecessary indirection
Change-Id: I73d70da7e6cc6006da92c05bf0b15da6b8bbf5bf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-12-19 10:37:55 +01:00
Eike Ziller
072d551c73 Merge remote-tracking branch 'origin/3.0'
Conflicts:
	qtcreator.pri
	qtcreator.qbs

Change-Id: I49dca8a41519869f122a4dfdbd6564b357ddeb1e
2013-12-05 11:58:42 +01:00
Orgad Shaneh
0a71091260 Limit cdUp to root
Task-number: QTCREATORBUG-10860

Change-Id: I22550b4415e07cac0d78f36595dc7ee781a837c0
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-12-03 14:42:07 +01:00
Jarek Kobus
72da839bbf Use VcsBaseClient::diff instead of cvs's one
The second step in cleaning a mess in VCS

Change-Id: I3eb360825480c74242110b0da9f90b39fc4c767f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2013-10-16 08:34:28 +02:00
Orgad Shaneh
fdb6ef90fc VCS: Do not try to add files that are already tracked
Task-number: QTCREATORBUG-2455
Change-Id: I4b1fa9676ad4a8d7293e035e4d6103251bef8aee
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: Cristian Tibirna <tibirna@kde.org>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-10-11 12:43:25 +02:00
Orgad Shaneh
2da85dc686 VCS: Rename diffBaseDirectory -> workingDirectory
Can have other usages than diff

Change-Id: Ieb01a88eb95503ac89b2f2c1120eddf404cdce5a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-10-10 18:59:50 +02:00
Orgad Shaneh
7b08d993bf VCS: Pass workingDirectory for annotate
Required for supporting renames on annotate.

The renamed file (and possibly its parent directory) doesn't exist
anymore, so it shouldn't be passed as a working directory.

Change-Id: I809e8df17c1dc5199e533b525244a668eccbcd5f
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-10-10 18:59:43 +02:00
jkobus
f54b935a61 Use book style capitalization for button labels
Change-Id: I9d74792f59a1209a3fbbd4fade39eee04d5ce5f4
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2013-10-10 10:45:28 +02:00
Tobias Hunger
eb4d64a860 Cvs: Remove some Cvs namespace usages
Change-Id: I73250f29ef9324d100202c855d78336935be7397
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-03 16:10:37 +02:00
hjk
a37589d431 Apply 'static' pattern to MimeDatabase
Also adjust and streamline using and surrounding code.

Change-Id: I6a8b05126bdcbb74ff611b21c7cb3c5902a2d5ca
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-09-03 11:41:45 +02:00
Orgad Shaneh
aefd61478a VCS: Replace AbstractCheckoutJob with Command
Command now provides the same functionality. Deduplicate code.

Change-Id: I789f021050471281870b6ef6a81a94e66fbdf0c7
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-02 11:50:10 +02:00
hjk
4a24df38a3 EditorManager: Use static pattern, adjust surrounding code
Change-Id: I3255a0150cd9a730336456c5a9f986eb74fefbff
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-30 11:22:56 +02:00
Orgad Shaneh
f2e4b2b9c8 VCS: Invert Command -> runVcs dependency
* Unclutter runVcs
* Enable more dynamic signal/slot usage in Command

Change-Id: Ie97b17078778b0c86b74d5725a78e766828ac6d8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-30 10:11:56 +02:00
Orgad Shaneh
cc2610aa71 VCS: Enable calling runVcs from non-GUI threads
* Introduce a proxy class for thread synchronization
* Use signals for appending text to output window

Change-Id: Iecbb010e6b6e9dab27d9862a43dafa450f2bb1f8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-20 12:53:33 +02:00
Orgad Shaneh
b0d14c79fe VCS: Use correct output style
Change-Id: I95ea8078ae53e7339213765fbb8a79bff33f899c
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-12 12:42:11 +02:00
Orgad Shaneh
35798d4ad6 VCS: Use a single filename for log
The list always contains a single entry (or none) anyway

Take 2. This time it actually compiles ;-)

Change-Id: I71a9822360a9b569ba79afa0f575e27918bb2e03
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-07 17:43:58 +02:00
Orgad Shaneh
0b4300a68c EditorManager: Make closeEditor public
And use it where appropriate

Change-Id: I0f37b8aada6eaa9be6743724b91a59173a01cb0c
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-08-07 11:08:36 +02:00
Eike Ziller
fade19a9bf Move IEditor::createNew to IDocument::setContents
The method is for setting the contents, so it belongs to the document,
and should be named correspondingly.

Change-Id: I40363dc08f11268f530885b512e4a88e8b10d096
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-17 09:00:17 +02:00
Eike Ziller
dd43d9908f Rename IDocument::fileName --> filePath
That is what it actually is, wrt how Qt API calls it.

Change-Id: Ied02055debf6aad75556b0d9d22e8ba2f72be555
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-09 13:51:42 +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
hjk
8390a32131 Settings: Simplify some user code
This is still way too much boiler plate code for the task at hand.

Change-Id: Ia03bff3d6947ea6372e3f5d0217c116728742b74
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-05-29 09:40:17 +02:00
Orgad Shaneh
a9d9d44494 VCS: Rename RegularCommandOutput to OtherContent
Change-Id: I37d47c79f0efaf51eb5afd1fe529aacfadff8ee1
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-24 12:29:34 +02:00
Orgad Shaneh
05ef32f242 Remove Nokia leftovers
Mostly internal mimetypes

Change-Id: Ia84206f1334c1f83474cbc307e848719bb98adbc
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-24 12:29:23 +02:00
Orgad Shaneh
fd48f081c6 VCS: Remove unused extension parameter from editors
Change-Id: I17e73e269698af0d515f668d3c272a748cdca3bb
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-24 12:21:26 +02:00
Orgad Shaneh
83b57eda89 VCS: Remove redundant calls to default constructor
Change-Id: I4521e26e72c85e896e58e4d9d129f92b2d80f869
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-04-22 09:29:12 +02:00
Eike Ziller
e31575a493 VCS: Clean up submit editor handling
It was not possible to simultaneously open two commit editors for
different version control systems, also there was no reason to scan all
open editors for the submit editor, since the plugins can just remember
the editor that they opened.

Change-Id: I1bea6ece3cd6faa1ecc0566bdd6f5fb10c816963
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-04-19 16:21:06 +02:00
hjk
fe29d6a8a3 Core: Remove Core::Id(QByteArray) constructor
This was mostly used to disambiguate the char * and the QString
constructors.

Change-Id: Ib6923ef8e8c0e5d514a883e73aa001a1cd9fb534
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-04-04 16:47:59 +02:00
hjk
2cea4c6f80 Vcs: Construct Core::Id directly for submit editor
Change-Id: I21ca57fa6b73887dfc88b31240096b0851d53cae
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-03-21 13:13:35 +01:00
Friedemann Kleint
281b2332d2 Fix Krazy warnings about includes/header guards in version control.
Change-Id: I75f2040e9b3dd5d9786faf2e829ec808af7f1304
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-03-12 13:56:47 +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
Orgad Shaneh
7cb80f0e16 VCS: Use entries combobox for log
Tests included

Change-Id: Ibe2f6ece207128f8467b0cbca9dc38f2bcd5ced6
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-30 10:26:31 +01:00
Orgad Shaneh
ea33bed564 VCS: Un-static testDiffFileResolving
Change-Id: I43c40585e5ac50369422d78f74240d7249be95ae
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-30 10:26:07 +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
Orgad Shaneh
3b66b11ac4 VCS: Add diff pattern tests for CVS and Mercurial
* Fix Mercurial pattern
* Make fileNameFromDiffSpecification protected again (it was made
  public for running tests, but they are now run from VCSBaseEditor)
* Remove DiffHighlighter::filePattern(). Not used anymore.

Change-Id: Ifc99f761f0ab96cc79f1d018e3f3c8cf4603da10
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-22 13:38:01 +01:00
hjk
7fafeaa513 CommandLocator: use Id instead of QString.
There seems to be still disagreement in the code what the
individual parameters are meant for.

Change-Id: I9c51e6ee9cc8fd1a55d202b8131027de1ef812a0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-18 15:56:23 +01:00
Orgad Shaneh
76f6729892 Git: Pass rows instead of files for diffSelectedFiles
Useful when the same file can appear more than once
(e.g. staged + modified)

Task-number: QTCREATORBUG-5347
Change-Id: I3ce716c22840c149490e00e6948612607ae57159
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-11 13:13:39 +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
Orgad Shaneh
7c4e2b6c60 Id: Add QByteArray constructor
Distinguish from const char * one.

QString ctor is yet to be removed

Change-Id: I2da231036c6417353b0566d39666d918ad141c6d
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-20 08:57:35 +01:00
Eike Ziller
6fd252b0a5 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.cpp
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessageloghandler.h
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/madde/maemodeployconfigurationwidget.h
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentinfo.h
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	src/plugins/remotelinux/remotelinuxdeploymentdatamodel.h
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/ichecklib_global.h
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h
	tests/manual/ssh/tunnel/tunnel.h

Change-Id: I04d7761df6bd936ad00e0547974284c967d39580
2012-10-05 21:20:50 +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
Christian Kandeler
3d9e492860 Do not use the fromAscii() and toAscii() functions.
They are deprecated in Qt 5. Use fromLatin1() and toLatin1() instead. In
Qt 5, these always do the same thing as their "Ascii" counterparts. The
same goes for Qt 4, provided QTextCodec::setCodecForCStrings has not
been set, which it hasn't.

Change-Id: I04edeb376762b6671eff8156094f0d5e2cb8e1ea
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2012-09-21 21:03:48 +02:00
Orgad Shaneh
7ffc4349f8 VCS: Allow use of base name for executable
Actual path is found on startup and when setting is changed

Change-Id: If2cb0735953b9fb64df7425230c98efb384d9287
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-08-21 15:31:51 +02:00