Commit Graph

119 Commits

Author SHA1 Message Date
hjk
aa69415ac7 Git: Aspectify settings
Change-Id: I87dfeba360967cc77cc230811bcd9f67b3ea6e38
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-03-19 13:39:33 +00:00
Eike Ziller
f8ae051816 VCS: Fix build with Qt6
QStringRef is gone.

Task-number: QTCREATORBUG-24098
Change-Id: I38dd1602294fcabf5cf7c1553bcfd93f3c47b601
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-09-21 06:56:58 +00:00
hjk
43b658e9e7 Utils: Drop Utils::SkipEmptyParts again
We require Qt 5.14 nowadays.

Change-Id: Iff245257d3cb19207007c0445ee13814e66152dd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-21 12:42:27 +00:00
hjk
1c81a3b3e8 All: Use Utils::SkipEmptyParts
Task-number: QTCREATORBUG-24098
Change-Id: Iab45de9a9c17ddc39a0e343b1175d4f6cb94b098
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-17 05:55:25 +00:00
Orgad Shaneh
af455fa40c Git: Fix upstream status for branches with slash
Like wip/foo

Change-Id: Ia2816660f7878e872b2e49c4811f5893a1b8dc75
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-05-19 14:06:48 +00:00
hjk
a09a563280 Git: Remove unused BranchModel::client()
Change-Id: I6465360d73b1d7580a922b295965d3c836d54ebe
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-02-03 07:15:05 +00:00
Alessandro Portale
24a25eed14 Use isEmpty() instead of count() or size()
Change-Id: I0a89d2808c6d041da0dc41ea5aea58e6e8759bb4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-20 20:56:57 +00:00
Andre Hartmann
da6972e0a9 Git: Update current branch after some operations
... to refresh the branch view upstream status.

No need for a full model update here, only the current
branch is influenced.

Change-Id: I6bd17a841988b36221e5015a5858071d33a7b5e5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-12-27 11:51:45 +00:00
Andre Hartmann
df42399102 Git: Use constants for branch view columns
Change-Id: Ia2e7b18c5f7d62b545c8f754b40d4d54b40aa199
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-12-27 11:21:21 +00:00
Andre Hartmann
4c5cf6bc86 Git: Update status on upstream change in branch view
When a new tracking branch was selected, the
branch view  still showed the old ahead/behind
information.

Change-Id: Ic4a201da0ec38788a02ef03770a30cca6528ceb3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-12-27 09:23:53 +00:00
Andre Hartmann
31e9c93b6b Git: Show upstream status for tracked branches
The Branch View now shows how many commmits
a branch is ahead and behind its tracking
branch.

Example:

  master ↑1 ↓15 [origin/master]

Change-Id: I9564efdfe82154cd98b9856313170aacad036f0c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2019-12-24 08:12:03 +00:00
hjk
251287f0d3 Avoid warning on empty expressions
For some reason, Q_UNUSED includes already a semicolon, adding one
on the user side creates an additional empty statement.

Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-23 11:55:59 +00:00
Orgad Shaneh
a1ba347fa5 Git: Fix popping of branch-stash after checkout
Checking out a branch that has a saved stash, when
Pop branch stash is checked, is broken since checkout
became asynchronous.

We must wait for checkout to complete before popping
the branch stash.

Change-Id: Ia4d43649e742ced0121ffe106986b4d6ed1e7b38
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2019-07-01 19:57:02 +00:00
Orgad Shaneh
1888e52d7c Git: Show at least 5 entries in Branches even if they're old
Fixes: QTCREATORBUG-22372
Change-Id: Ia4e0477a4e810c3c922cebbad1e44d295abca524
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-09 07:47:05 +00:00
Orgad Shaneh
b374086624 Git: Move parseOutputLine to BranchModel::Private
Change-Id: I885a0f6c6848b63bca0cb3047b28c984087f0bc8
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2019-05-06 06:19:40 +00:00
Orgad Shaneh
6595a161fc Git: Fix CppCheck warnings in BranchModel
Change-Id: I8c9fa0bff6e33675ad2a72176c4640f4dca3d51b
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2019-05-06 06:19:31 +00:00
Orgad Shaneh
2a8c48cb15 Git: Track external changes to HEAD
Fixes: QTCREATORBUG-21089
Change-Id: Ifcbefd4f57bfdb5c726eced194076503c1dcb497
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-01-09 12:39:01 +00:00
Orgad Shaneh
92431932e3 Git: Show detached HEAD in branches view when applicable
Fixes: QTCREATORBUG-21311
Change-Id: Ia4297d23a965d83ea2814bd1e41f35a3017b8e9b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-11-12 09:48:25 +00:00
Orgad Shaneh
1ef39405a4 Git: Pimpl BranchModel
Change-Id: I18b7fae8b47b449cf1f049a466efb6a1fbb7e522
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-11-11 11:57:52 +00:00
Andre Hartmann
077953b923 Git: Forbid local renaming for date column
Renaming the date doesn't make sense.

Amends a82dd10518

Change-Id: I2eea83572e3bf69633a6f154a3648b34cf93707f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-11-06 11:52:36 +00:00
Orgad Shaneh
a82dd10518 Git: Enable renaming local branches by direct editing
Change-Id: I7edab94d949a6e48642f280af52fd156c803cafb
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-11-04 20:37:44 +00:00
Orgad Shaneh
a9ac438ad8 Git: Add quick filter for branches panel
Change-Id: Idef4ab2db69f24bb004c00fa010b814fdaa7d56d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-10-18 12:26:26 +00:00
Orgad Shaneh
762fb5c353 Git: Make checkout asynchronous
It can be slow when many files are replaced.

Change-Id: I308698ef36973374f4526107fbda0d9ad907e707
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-10-10 08:30:16 +00:00
Orgad Shaneh
b3e2c580f2 Git: Fix return value of BranchModel::refresh
Return false if for-each-ref fails, and true if not applicable (this is not
an error).

Fixes: QTCREATORBUG-21189
Change-Id: I895046f8c15c30abeddaa8b4231fb4bd46c343ef
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-09-27 18:36:48 +00:00
Nikolai Kosjar
8b93eee3b1 Git: Double click on branch shows log
...instead of allowing to rename inline. Renaming can still be done with
the context menu.

Inspecting the log is a more common operation.

Change-Id: Idb3fb8fe01b6a5ae57a2eba09b27a36f677e566a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-09-27 14:15:40 +00:00
Orgad Shaneh
6296e7bb38 Git: Avoid usage of deprecated QDateTime::fromTime_t
Change-Id: I37ce617990ee385e37261624d847a0aef757d283
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-09-21 08:16:28 +00:00
Andre Hartmann
487e2f5d04 Git: Fix warning in branch model
Change-Id: Ia36c91bfc2cd738cf16548f5044b1535de39a88d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-09-16 20:24:32 +00:00
Andre Hartmann
8c8f166535 Git: Add fetch to branch view
Allow fetching from a single or from all remotes.

Change-Id: I2e0e69a092c3a8bb58f65af877c9af8bb59c92d9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-09-15 19:05:23 +00:00
Orgad Shaneh
7d3a79c696 Utils: Purge asConst
Replace by qAsConst.

Change-Id: I3301366f73c066c86f08df7188d70dc3b613c55c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-04-09 09:04:00 +00:00
Orgad Shaneh
b30b4f8a11 Git: Fix inline nested branch rename
We can't just change the node name. A branch named foo/bar can be
renamed to baz/yyy. We have to refresh the model after rename.

Change-Id: Id9dfaa15b9e0384668223ae746376025267f89a3
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-03-26 20:38:03 +00:00
Orgad Shaneh
5736ef2c54 Git: Improve detection of nested local branch
If the current branch was foo/bar it was not detected correctly.

Change-Id: Ic030a6f4659801c6da2716c272a418c89585e22f
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-03-26 20:37:58 +00:00
Orgad Shaneh
8478e35384 Git: Minor cleanup in BranchModel
* Use member initialization
* Use nullptr
* Remove unneeded local var

Change-Id: Ibca6c3bc5caf9e028166b833ba1ed9fc165e290b
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-03-26 20:37:49 +00:00
Tim Jenssen
2631ffabd5 Remove spaces in initializer lists
Format initializer lists code style like.

Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013
Reviewed-by: hjk <hjk@qt.io>
2017-02-22 16:25:09 +00:00
Orgad Shaneh
e366e135b7 Git: Eradicate Q_FOREACH loops
Change-Id: I29b6071ea244d1b3ae0701d36c90b1e93cf21fbb
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: hjk <hjk@qt.io>
2017-02-06 09:37:44 +00:00
Orgad Shaneh
cfc8ed41c7 Git: Some more QStringList cleanup
Change-Id: I0c6e8f768ee46985dab8ae14f88f2bc8d34fed26
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2016-08-15 07:30:06 +00:00
Orgad Shaneh
516161c875 Git: De-noise
* Remove QLatin1{String|Char} where possible
* Use initializer lists for QStringList

Change-Id: I8479f87f4fc909b5d74d854956885564209538e4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-22 10:12:59 +00:00
Orgad Shaneh
c125fbbe97 Git: Refix filtering of obsolete branches when adding a branch
It was fixed in 62c60c6d1c but broke again
by 04eb012267.

Task-number: QTCREATORBUG-16264
Change-Id: I1130d5c2eda3320714913570441499be0d55c8fe
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2016-07-17 18:12:21 +00:00
Orgad Shaneh
3d63136836 Git: Show date and time for newly created branches
Task-number: QTCREATORBUG-16484
Change-Id: I18b262d2d03f6a793123cc655f415a1d46d1a4e3
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-23 13:05:23 +00:00
Orgad Shaneh
04eb012267 Git: Show date and time in branches dialog
This helps discovering recently active branches.

Change-Id: Ic82e1257c2a3407149e62768ddf2fc25c1a54b6b
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-05-19 13:39:59 +00:00
Orgad Shaneh
62c60c6d1c Git: Filter obsolete branch names when adding a branch
Task-number: QTCREATORBUG-16264
Change-Id: Ifcb04c7740ab274be590f53757e013da43ad96f1
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2016-05-17 05:07:39 +00:00
Orgad Shaneh
43f8f04ed6 Git: Show current branch even if it is obsolete
Change-Id: I694284c359812d9d0030fcdd934af4b98722aaa0
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2016-05-17 05:07:34 +00:00
Orgad Shaneh
5834769cbf Git: Hide obsolete branches by default in branches dialog
Task-number: QTCREATORBUG-15544
Change-Id: I411c7eacd2c154cad08234c0bd22e16dfecb961c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-10 10:24:50 +00:00
Orgad Shaneh
6d08c1f914 Git: Document line output in branch model
Change-Id: I723df048844cf9a803aa0c438cddf8fdcdd407ba
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-03-10 07:41:46 +00:00
Tobias Hunger
b4195d5174 Git: Modernize
* pragma once
* member initialization
* s/struct/class/
* Introduce a static GitPlugin::client() method and use it

Change-Id: Ifdcac86dd16f3cdba11d564d03e9a15f00a6afdb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-02-10 15:01:57 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Tobias Hunger
eec0a03212 Vcs: Split up VcsCommand
Move the biggest chunk into Utils::ShellCommand, add some Qt Creator
specific magic in Core::ShellCommand and leave the rest in
VcsBase::VcsCommand.

Change-Id: I5fe6f7076e96023ad2164bcfaacfb3b65a7ff8a8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-04 15:27:25 +00:00
Tobias Hunger
90ce38da39 Vcs: Move handling of settings from VcsBaseClient to VcsBaseClientImpl
... and update users of that functionality accordingly.

Unexpected plus: Now every supported VCS actually saves their setting
when requested.

Change-Id: I02db7b2ce14e5f52d26409b2a01aea290c2a294a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-08 09:30:44 +00:00
Eike Ziller
9926fc2ab1 Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'
Conflicts:
	src/libs/utils/tooltip/tipcontents.cpp
	src/libs/utils/tooltip/tipcontents.h
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/baremetal/baremetalconstants.h
	src/plugins/baremetal/baremetaldevice.cpp
	src/plugins/baremetal/baremetaldevice.h
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.h
	src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h
	src/plugins/baremetal/baremetalplugin.cpp
	src/plugins/baremetal/baremetalplugin.h
	src/plugins/baremetal/baremetalruncontrolfactory.cpp
	src/plugins/baremetal/baremetalruncontrolfactory.h
	src/plugins/cppeditor/cppcodemodelinspectordialog.cpp
	src/plugins/cppeditor/cppdoxygen_test.cpp
	src/plugins/cppeditor/cppdoxygen_test.h
	src/plugins/debugger/breakpointmarker.cpp
	src/plugins/debugger/debuggeritemmodel.cpp
	src/plugins/debugger/debuggeritemmodel.h
	src/plugins/debugger/loadcoredialog.cpp
	src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp
	src/plugins/projectexplorer/addnewmodel.cpp
	src/plugins/projectexplorer/addnewmodel.h
	src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.h
	src/plugins/qmlprofiler/notesmodel.cpp
	src/plugins/qmlprofiler/qml/CategoryLabel.qml
	src/plugins/qmlprofiler/qml/MainView.qml
	src/plugins/qmlprofiler/qml/Overview.js
	src/plugins/qmlprofiler/qml/Overview.qml
	src/plugins/qmlprofiler/qml/TimeDisplay.qml
	src/plugins/qmlprofiler/qml/TimeMarks.qml
	src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.h
	src/plugins/qmlprofiler/timelinemodelaggregator.cpp
	src/plugins/qmlprofiler/timelinemodelaggregator.h
	src/plugins/qmlprofiler/timelinerenderer.cpp
	src/plugins/qmlprofiler/timelinerenderer.h
	src/plugins/qmlprojectmanager/QmlProjectManager.json.in
	src/plugins/texteditor/findinfiles.cpp
	src/plugins/vcsbase/vcsconfigurationpage.cpp
	src/shared/qbs
	src/shared/scriptwrapper/interface_wrap_helpers.h
	src/shared/scriptwrapper/wrap_helpers.h
	tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp
	tests/system/suite_debugger/tst_debug_empty_main/test.py
	tests/system/suite_debugger/tst_qml_js_console/test.py
	tests/system/suite_debugger/tst_qml_locals/test.py

Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
2015-02-12 17:29:21 +01:00
Orgad Shaneh
620d1c36e5 VCS: Remove unneeded qualifications
Mostly done using the following ruby script:
Dir.glob('**/*.cpp').each { |file|
  next if file =~ %r{src/shared/qbs|/qmljs/}
  s = File.read(file)
  s.scan(/^using namespace (.*);$/) {
    ns = $1
    t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
      before = $1
      char = $2
      if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
        m
      else
        before + char
      end
    }
    if t != s
      puts file
      File.open(file, 'w').write(t)
    end
  }
}

Change-Id: I061c7bdcade96961aed226a8348f8ab07ee95f5f
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-02-04 13:22:55 +00:00
Tobias Hunger
03c9b935de Git: Sprinkle with auto
Change-Id: I13886e17ee49702a69450e0f0b7d161cdfed1385
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-01-22 14:19:09 +01:00