Commit Graph

337 Commits

Author SHA1 Message Date
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
Francois Ferrand
4d1bbebf2a Git: Add customizable repository browser command.
Change-Id: Iac297e3665b18d97ca80097c4dd33dd70e64b9a1
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-03-12 15:49:17 +01:00
Tobias Hunger
8973ef31cc Git: Do not pull --rebase when changes are not stashed
Git will not do a pull --rebase when there are changes. So we
now abort if the user did not stash them instead of trying to
pull.

I do not want to revert user changes implicitly.

Task-number: QTCREATORBUG-7031
Change-Id: Ic6041755938be36d8ecdbcbac373b5c38642360d
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-03-05 17:15:26 +01:00
Tobias Hunger
ff61a6e030 Git: Clean up indention
Change-Id: I10fc926c7f912bf616d3945f231e1848c25f301e
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-03-05 10:11:12 +01:00
Orgad Shaneh
6d97c0ecc1 Git: Enable 'Show' for files, not only commits
Change-Id: I0f49d3a26c801af84bb578478bd4778356507cf6
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-02-21 10:41:03 +01:00
Eike Ziller
d66acb51d0 Rename IFile->IDocument and FileManager->DocumentManager
And adapt the other API respectively.

Change-Id: I1e04e555409be09242db6890f9e013396f83aeed
Reviewed-by: Bill King <bill.king@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-20 13:32:49 +01:00
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
Friedemann Kleint
e2ace515e2 Version control: Compile with QT_NO_CAST_FROM_ASCII.
Change-Id: I85c007045efdb207f397b42fbce7a554ac9c9819
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-01-31 11:26:52 +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
21c0cdee40 Core::Filemanager: make some methods static
This follows suit to the ICore changes.

Change-Id: Iba2de1b1e3f2574fd1459892eae702e6af1cc7dc
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-25 19:23:11 +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