Commit Graph

1132 Commits

Author SHA1 Message Date
Orgad Shaneh
ca5d52fee9 Git: Open untracked files on double-click
Task-number: QTCREATORBUG-6612
Change-Id: Ic56f4cd20063c9d4d05316607636aa3df1d1a5a3
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-03-18 12:00:25 +01:00
Andre Hartmann
ae09c33fdf Git: Use commit encoding for git show.
At least for the Side-By-Side Diff for now.

Task-number: QTCREATORBUG-11115

Change-Id: Ic7cb91f48ca810a99c39b2d00acc0cf227d051be
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-03-18 11:54:04 +01:00
Orgad Shaneh
e568d14b36 Git: Use commit encoding for interactive rebase and commit editors
Task-number: QTCREATORBUG-11115

Change-Id: Ie922d94d66bed2882d3fc2b8b2de1bdc328d4d1c
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-03-18 11:40:24 +01:00
Orgad Shaneh
86d7916b5b Git: Factor out commitEncoding
Task-number: QTCREATORBUG-11115

Change-Id: I58f3759c13d963aaf3e7891d7cc0a41c1ae14ecd
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-03-18 11:39:54 +01:00
Robert Loehning
991e1bfa0a VCS: Fix message in GitClient
Change-Id: I1184b15a8b225430b59e0abb35cd9395cb7d1850
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-03-17 21:12:36 +01:00
Jarek Kobus
2c42b06f00 Fix some strings.
Change-Id: Iaac415d25ebfac507df73fc4b3977425df521979
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-03-14 15:57:28 +01:00
Jarek Kobus
96a3fd53e8 Fix tooltips, add lacking dots
Change-Id: Id54a11b6868d5033fd1ecfd6324b7e50b94e305c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-03-13 12:06:27 +01: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
Joerg Bornemann
84df758ec6 use new base import style in qbs files
Change-Id: Iecf32122df41f304ec6df538bb0dd8a263238a86
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-03-11 14:20:22 +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
Tobias Hunger
bddf1d1101 Git: Report additional search paths
Change-Id: I07d9ea0946ec44b4d1a7d7d02b1f50dbaf78f6e6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-03-05 14:00:43 +01:00
Sergio Ahumada
c375436847 Fix some typos
Change-Id: I3be73c2a4d256a0d28e863fd2517a4d7442b34d8
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-03-05 09:39:42 +01:00
Friedemann Kleint
b653ca1f18 Revert "Git: Replace %n with %1 in string"
This does not work, it needs to be either:

("%1").arg(n) or ("%n, 0, n)

The %n syntax is preferred here since although there probably
are always > 1 elements, some languages use different grammatical
cases for various numerical ranges (Russian, Polish).

This reverts commit c09e80b853.

Change-Id: Id3f480f0ec0de2dd8893b8de256c5e6c9628a6f9
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-28 15:35:32 +01:00
Orgad Shaneh
c09e80b853 Git: Replace %n with %1 in string
There is no plural form in this message

Change-Id: I85b584d4e53e68128279d50cb6b63e259f7a35b5
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-28 10:37:56 +01:00
Orgad Shaneh
1817c48c7b Git: Use git describe for topic before falling back to "Detach Head"
Change-Id: Iaf8be78ac3b6119f01ad3491eec7eccfa5f45e26
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-27 14:44:54 +01:00
Orgad Shaneh
f74021260a Git: Reorder buttons in branches dialog
Reset works on current branch by the contents of another, like Merge and
Rebase.

Change-Id: I904823c177dd3c79ff8e1f49fe32d82be9bb8797
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-27 14:44:27 +01:00
Orgad Shaneh
4465276e10 Git: Conditionally enable Reset button in branches dialog
Conditions:
* There is an active local branch
* The selected node is a leaf
* The selected node is not the active branch

Change-Id: I539dd13750737934378e503484646634e50a1aa7
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-27 14:44:04 +01:00
Orgad Shaneh
cb7f9fe496 Git: Remove refs/heads/ prefix from reset message in branches dialog
Change-Id: Ia93cbb52038c1ea29f5fa441c9eb0e88cb11d9aa
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-27 14:43:42 +01:00
Orgad Shaneh
5c942d04c5 Git: Suppress show-ref command logging
Yet another plumbing command...

Change-Id: I88ba2349d8c15e47372addb3034f1bed2de170f2
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-27 14:43:38 +01:00
Orgad Shaneh
18906fac4f Git: Protect against removal of the "Local Branches" node
... When a single local branch is being removed

Change-Id: I4321d045ebb6faaf5f864ff33cb4f34c15d2264b
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-27 14:43:12 +01:00
Tobias Hunger
d967b6413f Git: Add reset button to branches dialog
Task-number: QTCREATORBUG-11391

Change-Id: I5146a8b00a88124f96c788cba2bbfa786618ee20
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-25 15:44:10 +01:00
Lorenz Haas
ac70c168da Optimize usage of QPalette
setPalette() does not replace the old one but rather adds the
difference. Thus a previous copy of the palette is unnecessary.

Change-Id: I5c06da456b76144efc4a984ccda13c7d2243a7bc
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-02-21 08:53:28 +01:00
Orgad Shaneh
cd48c5e513 IVersionControl: Implement topic cache in the base class
Derivatives need to derive TopicCache, implement its pure virtual
functions and pass it in IVersionControl's constructor.

Change-Id: I3a904c84541fda95eee75296f86441c4bae55d79
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-19 09:25:31 +01:00
hjk
c68ebeed2e QtcProcess: Introduce a QtcProcess::Arguments class
This is used to get a platform-agnostic handle on "command line
arguments". It essentially wraps a single QString on Windows,
and a QStringList everywhere else.

As a consequence, several occurrences of #ifdef Q_OS_*
can be removed from the codebase.

Change-Id: Ic93118c1bd0bce0ebb58f416d395dbaebb861772
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-02-19 09:19:28 +01:00
Orgad Shaneh
c43db28195 Git: Fix wrong variable name
Change-Id: Ie79fddadc6835805f1fa6e811592c30cf32e5c9c
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-02-19 08:36:06 +01:00
jkobus
73cf43f323 Add DiffEditorManager, refactoring.
GitDiffSwitcher operates now on IDocument.
GitDiffHandler operates now on DiffEditorController.
"source" property now attached to editor's document (VcsBasePlugin).

Change-Id: Ie2570a597b8b992ac1dc33b9179eca459c8a751a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2014-02-18 13:46:49 +01:00
hjk
a74de6af81 Utils: Merge FilterLineEdit into FancyLineEdit
Change-Id: Ic53836dade3985c36b0f6767e43b5af0ddb80d72
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-02-14 16:58:43 +01:00
Orgad Shaneh
48a5fb4b13 PushToGerrit: Do not calculate number of commits for empty input
Change-Id: Ib2e5305dd47b486a963edf5bb04e6d16d76d5e68
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-14 10:38:34 +01:00
Orgad Shaneh
5a562e9239 PushToGerrit: Pass local branch to determineRemoteBranch
Simpler

Change-Id: Ice180200a1b78e57b8ff6b246db7b2e8f3b39eb1
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-14 10:38:30 +01:00
Orgad Shaneh
0c6ee31684 Git: Fix target branch auto-detection in Push to Gerrit
Initialization order is important.

* updateCommits populates the LogChangeWidget.
* determineRemoteBranch looks up by earliest commit (for which the
  LogChangeWidget must already by populated)
* Assignment to m_suggestedRemoteBranch must come before calling
  setRemoteBranches
* remoteComboBox was wrongfully used instead of targetBranchComboBox

Change-Id: Ib0db057313c8fd65910b0ec7394b6b8c7d997dab
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-14 10:38:24 +01:00
Orgad Shaneh
635a355f97 Git: Suppress "No local commits" error message in Push to Gerrit
Change-Id: Ib0cf79acf48d24848fda92a8b7b06efe62b46dbc
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-12 12:42:45 +01:00
Orgad Shaneh
b7d2268ff3 Git: Suppress log output in LogChangeWidget
It's distracting

Change-Id: I6c522ee61ba7261611002bf40c01a9d1d23a0259
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-12 12:42:42 +01:00
Orgad Shaneh
0bb318939b Git: Suppress for-each-ref
Another plumbing command

Change-Id: I1450baae370e46e8daf5c440def7e9f04d9d01bb
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-12 12:42:37 +01:00
Orgad Shaneh
7ed1576083 Clean up single namespace forward-declarations
Done using the following ruby script:

Dir.glob('**/*.h').each { |file|
  if File.file?(file)
    s = File.read(file)
    t = s.gsub(/^namespace .+ \{\n\s*class .*;\n\s*\}.*$/) { |m| m.gsub(/\n\s*/, ' ').gsub(/\s*\/\/.*$/, '') }
    if t != s
      puts file
      File.open(file, 'w').write(t)
    end
  end
}

Change-Id: Iffcb966e90eb8e1a625eccd5dd0b94f000ae368e
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-02-12 09:30:37 +01:00
Tobias Hunger
8c1c284789 Qbs/qmake: Fix dependencies of plugins
... based on output from dependencyinfo.py script

Change-Id: I9532f6d259f15c16b62fae0ca18f8a8cad95bd11
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-11 13:23:26 +01:00
Orgad Shaneh
1ed9f6bbca Git: Enable local branch selection in Push to Gerrit
Show dialog even if there are no local commits in current branch

Change-Id: I11e0c6505981712df51bb33694a6cba9704d7324
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-11 12:06:29 +01:00
Orgad Shaneh
292e4599aa Git: Rename branch -> targetBranch in Push to Gerrit
Change-Id: I725a7e9ece2bf1e8854dc077cb93a1f7cc1eb90c
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-11 12:06:24 +01:00
Orgad Shaneh
517c357770 Git: Factorize ctor of Push to Gerrit
Change-Id: Ib668d0e29bac25bc2f78d8885b4dfa89c292b489
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-11 12:06:19 +01:00
Orgad Shaneh
6db52645b9 Git: Silence rev-list execution
It's plumbing. Not interesting for the user.

Change-Id: I65bb7849c64f32ac24684715290acf26441c5d2b
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-11 12:06:12 +01:00
jkobus
7267c95acf Fix a crash on "Switch to Text Diff Editor"
Task-number: QTCREATORBUG-11448

Change-Id: Id0239d5cf71ff857ac384e18136348df92a98b74
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-02-11 11:40:46 +01:00
Orgad Shaneh
346f0c3177 Git: Remove unused functions
Change-Id: I279dcf1ee1c1fe16d3a1fd866af4f9cc4a8c9070
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-10 10:44:25 +01:00
Orgad Shaneh
757a5a2867 Git: Detect rc versions
Rename local vars to avoid collision with macros defined in
<sys/sysmacros.h>

Change-Id: I6da7354102cca898d2600296242131e4c343c019
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-06 11:10:09 +01:00
Orgad Shaneh
92a133b09a Git: Increase limit in LogChangeDialog to 1000 entries
Task-number: QTCREATORBUG-11200
Change-Id: Iff6073c4f84926a18006c1f47b30a0525134c2ba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-02 06:44:34 +01:00
Jarek Kobus
edac8f082d Get rid of DiffShowEditor.
Made DiffEditor customizable instead

Change-Id: If92799d47c7e731febb45197384c082eb3af55df
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2014-01-30 19:13:48 +01:00
Jarek Kobus
c18fa9112b Rename DiffEditorWidget -> SideBySideDiffEditorWidget
It's the preparation for the new UnifiedDiffEditorWidget

Change-Id: I018899017c7e711ea8b04d85f8298b0d73f1cbab
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2014-01-30 17:13:14 +01:00
Orgad Shaneh
aa6dd83e08 Git: Replace bool argument with flags
For a start, it's a single flag. Will be extended.

Also change the default for includeRemotes to false (most callers pass false)

Change-Id: I969f89a06b85a42c134c0232d2947d58fe19ea0d
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-01-29 11:05:13 +01:00
Orgad Shaneh
25ddacc238 Git: Add using Git::Internal to GerritPushDialog
Change-Id: I7b2dab05809040397c7221ed830730bc1c5a019d
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-01-29 11:05:04 +01:00
Eike Ziller
3422995521 VCS editors: Fix revision markers
Resets the revisions when setting the contents of text editor documents
in general.

Task-number: QTCREATORBUG-11356
Change-Id: I4069d629d8a612d42c7deae707300d50690e2db7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-01-29 10:04:47 +01:00
Petar Perisin
e163356f9f Git: Branches dialog - ensure all documents are saved
Change-Id: Ia48157b10fb2f9eb3a8b9b8e7e541a736dd75b4f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-01-27 16:23:09 +01:00