Commit Graph

197 Commits

Author SHA1 Message Date
Orgad Shaneh
9b22c8ed62 Revert "Git: Undo changes on pull with rebase when user chooses not to stash"
The dialog text doesn't state that the changes will be
discarded. This is likely to be an unexpected behavior.

Will improve the dialog on master

This reverts commit cf41cd5e2a9b1927fd533789a30cfd80a4e0791e

Task-number: QTCREATORBUG-7031
Change-Id: I52eaf3cdef1b10b261ee9d2e9e14aa98e6e32bdd
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-03-20 12:15:40 +01:00
Orgad Shaneh
e427eab068 Git: Close submit editor if all changes were committed externally
Change-Id: Iae4e9d52aed333def0e5f0c56bca9c68a38430a4
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-03-01 11:25:22 +01:00
Orgad Shaneh
7a7117cd33 Git: Undo changes on pull with rebase when user chooses not to stash
Task-number: QTCREATORBUG-7031

Change-Id: I10bee004482bf8f066f1ddfcf720797e8005ebec
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-02-27 15:27:10 +01:00
Orgad Shaneh
cdcc8256a0 Git: Require 1.7.2
Remove legacy code

Change-Id: I0ce03f7a34c92b48ceb705a0feec43e0ba89ef5c
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2013-02-20 13:29:11 +01:00
Tobias Hunger
6f0294b03d Git: pull --rebase when appropriate
Task-number: QTCREATORBUG-8732

Change-Id: I510ac93b118e93cba591c4717cb6779d64869be1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-02-14 15:36:30 +01:00
Orgad Shaneh
ae58073080 Git: Add test-case for untracked file
Change-Id: I29e0e470c926d1051cc892fbd39874d8b071268c
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-02-11 11:10:05 +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
8f4817152c Git: Add subject to log combobox
Change-Id: Icb76ad1c0783615172d929e8cf402feaffaddbdd
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-30 10:26:58 +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
5551c1e906 Git: Introduce StashGuard
Offers the user to stash changes (if relevant), stores
the results and pops the stash when it goes out of scope
(unless disabled)

Change-Id: Ibc0d2a5d3e3c953062fb17ecba903ca814524837
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-24 12:32:26 +01:00
Orgad Shaneh
89d16332d1 Git: Replace synchronousStash with ensureStash
When flags are not used. syncStash doesn't return result,
which can be useful for StashGuard

Change-Id: I1327b5d8d10410e7a3b9fdb07a03b476d5abcdc4
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-23 15:13:27 +01:00
Orgad Shaneh
7b39f41c05 VCS: Refactor fileNameFromDiffSpecification
Use diff file pattern to match file name. Avoid duplication.

Include unit tests for Git

Change-Id: Ib68a08368270a27976a3e16bdd1cb219a52b8889
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-21 12:19:55 +01:00
Petar Perisin
65aef73ec4 Git: Added Revert and cherry-pick
Change-Id: Ic8ba7434e79b12eca680a67c2845c82915dc0088
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-21 10:41: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
Petar Perisin
b7faf4d674 Git: added custom message to EnsureStash popup
Better overview in stash dialog.

Change-Id: Icb6d3f8e2e068882e661e017ce8a0bb00ec6dba5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-17 11:18:28 +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
Petar Perisin
4009c305fb Git: Fixed a bug with rebase check
Rebase on pull should check if branch configuration has rebase set to
true. This is important to correctly abort operation when conflicts
appear, and user chooses not to run mergetool

Change-Id: I365aa534bdbece466514f542ea2e3c371c89a4a8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-10 10:52:26 +01:00
Petar Perisin
3afa4a199f Git: Added soft Reset
Added Soft Reset to Reset Dialog

Change-Id: Iba5b6a37aef2b89c998c21a3d8ecca1075cbda10
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-09 13:26:35 +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
cecfffc7a3 VCS: Refresh submit editor status when it might change
Including Git implementation

Task-number: QTCREATORBUG-5644

Change-Id: Ic5dede99d93b84e5d271292b4694216f51e66882
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-12-30 21:47:35 +01:00
Orgad Shaneh
60129c40ef Git: Only stash pop if pull succeeds
Change-Id: I7861d862fdd3d24201e39bb4c7a9cb91643acc35
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-12-30 12:54:21 +01:00
Petar Perisin
4ffc1a2f10 Git: Custom gitk launch
Launch gitk only for current file,
or for the folder that current file belongs to

Task-number: QTCREATORBUG-8327

Change-Id: I2ffbd44e3b3eeaffad32e84af9ca2085b16fdaa2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-12-12 12:19:57 +01:00
Petar Perisin
9f276bddb8 Reorganized Git menu
Suggestion for reorganized Git menu,
because there are a lot of items in there

Task-number: QTCREATORBUG-8363

Change-Id: I00bcf6b210d9a2bcb081a17a0ea288d71f65a9f4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-12-11 14:38:49 +01:00
Orgad Shaneh
cf6298ff32 Git: Introduce MergeTool support
Change-Id: I906c3c692d9f4819bdf2a1489c42ae04f292894d
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-07 16:12:27 +01:00
Orgad Shaneh
5011ba940f Git: Support merge status
Change-Id: If0338d066a2844a8bedf3e5ecf89979dc5c20385
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-10-29 14:59:42 +01:00
Orgad Shaneh
ab85e7342e Git: Extract FileState from CommitData
* Add a QFlags type for it and use it
* Clean up GitClient::addAndCommit
* Rename Updated -> Unmerged

Change-Id: Id96f71fb78af923605f5773f65a5625244a49499
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-10-29 14:59:29 +01:00
Orgad Shaneh
2198fa90eb Git: Add tests for status line parsing
Change-Id: I1519672ffbaafc1367addde5cd2111b1fe9810b2
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-10-26 14:18:29 +02: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
Orgad Shaneh
614bb33589 qbs files: Consolidate includePaths in QtcLibrary and QtcPlugin
Avoid using "." as includePath when it is unneeded

Change-Id: I9bc6f4ebe50409f49782520033fd5f098aed10d0
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2012-10-05 10:18:56 +02:00
Eike Ziller
6faede0860 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	share/qtcreator/qml/qmlpuppet/commands/changenodesourcecommand.h
	share/qtcreator/qml/qmlpuppet/commands/tokencommand.h
	share/qtcreator/qml/qmlpuppet/container/reparentcontainer.h
	share/qtcreator/qml/qmlpuppet/qml2puppet/instances/componentnodeinstance.h
	share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/nodeinstanceclientproxy.cpp
	src/plugins/git/gitsettings.cpp
	tests/manual/ssh/remoteprocess/remoteprocesstest.h

Change-Id: I00c294e6d911d272615e65fed58562399af97a4e
2012-09-27 20:38:57 +02:00
Tobias Hunger
ac6c11ec19 Git: Simplify code a bit
Change-Id: Iac245c92039f522cc0a599461572f9fd54cf43ae
Reviewed-by: Hugues Delorme <delorme.hugues@fougsys.fr>
2012-09-27 11:50:03 +02:00
Tobias Hunger
9e9dd99310 Remove useless headers
Change-Id: Iee4a6f549f8a7c028f52a1e6113b33034ef621e2
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-09-26 15:44:41 +02:00
Christian Kandeler
89fa7823b3 Replace all remaining functions deprecated in Qt 5, if possible.
These are:
    - QInputDialog::getInteger() [-> getInt()]
    - QKeySequence::operator QString() [-> toString()]
    - QRegion::intersect() [-> intersected()]
    - qVariantCanConvert() [-> QVariant::canConvert()]

Plus some left-over occurrences of qFindChild() and
QAbstractItemModel::reset() that were missed by the
respective earlier patches.

All deprecated features still left are not trivially
replaceable, i.e. the code using them cannot be made
to compile with both Qt 4 and Qt 5.

Change-Id: I32541681bbf66b0fef78f5c7025521f9ff84f463
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-25 11:01:04 +02:00
Christian Kandeler
1b3d637c1b Replace qVariantValue() with qvariant_cast().
qVariantvalue() is deprecated in Qt 5. qvariant_cast() does
the same thing and works in Qt 4 and Qt 5.

Change-Id: I922329d3a47fe394669f5d97a25f0825d3d2dea5
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-20 09:41:37 +02:00
Friedemann Kleint
a1b696c718 Git: Rename 'Undo uncommitted repository changes' to 'Reset...'.
'Reset' is in sync with the command line option and more
appropriate to the functionality after the introduction
of the history dialog.

Change-Id: I2328c7137089a5f372b59b4db7074753a16ecbdf
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@nokia.com>
2012-07-31 15:01:37 +02:00
Konstantin Tokarev
d18bf468ad Changed return type of :ICore::mainWindow() to QWidget*
Also removed all <QMainWindow> includes which are not needed
anymore.

Change-Id: I393c9a62a5c6df95d9f35d872e1473a4f13bcdc4
Reviewed-by: hjk <qthjk@ovi.com>
2012-07-19 15:15:53 +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
Orgad Shaneh
202ce8ad70 Git: Improve Clean dialog
Check file iff it is not ignored

Change-Id: I16a489bdd772ea9b4df462b449a23324b5ef3b77
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-07-02 11:13:33 +02:00
Orgad Shaneh
ad7874ed87 Git: If stashed before pull, stash pop after it
Change-Id: Ie983df1ffadac27551bbc51199784c0bc8610c14
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-06-26 10:30:47 +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
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
48a23cc28b Mac: Avoid Alt+<character> shortcuts
Because these tend to add special characters into the editor instead of
triggering the shortcut. Use Ctrl (aka Qt's Meta) instead.

Change-Id: I5866772baf4550e6d048e4d7252b2899a6d28296
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-05-22 16:48:20 +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
Friedemann Kleint
9a5fa0dd48 Git: Offer recent list of changes for reset --hard.
This makes it easier to remove changed applied for review
by Gerrit.

Change-Id: I2e3407ae4e74b650d08d53fed37e9aeb11071a4e
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-05-02 11:12:49 +02:00
Friedemann Kleint
2193915cca Start on a gerrit plugin as a sub-plugin of git.
- Add a gerrit window that shows a list of changes
  and buttons to display, apply or check out
  a change.
- Uses the new Qt 5 Json API or the utils/json
  classes for Qt 4.

Tested-by: Tobias Hunger <tobias.hunger@nokia.com>
Tested-by: Orgad Shaneh <orgads@gmail.com>

Change-Id: I14c6c2c2de8f95fb785752c7319be8638b386a1e
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-04-26 14:34:41 +02:00
hjk
5b0bf61640 qtcassert: move actual printing to separate function and enforce style
This also allows simple setting of breakpoints on failed asserts.

Change-Id: I6dd84cbfaf659d57e39f3447386cebc0221b2b84
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-04-17 09:53:44 +02:00