Commit Graph

435 Commits

Author SHA1 Message Date
Alessandro Portale
9c830a1619 Git: Use Utils::Icon for IconItemDelegate constructor
Use our icon abstraction instead of file names, because themed icons are
coming.

Change-Id: I0f4e44caf96aeab0c354d2166b111d59b7b29149
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-10-11 13:29:30 +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
Ulf Hermann
15fbfaf2e9 Move icons to Utils
This way we can use them from libraries, not only from plugins.

Change-Id: Ic35cfd5f04d638d87606bf272b2c00ded1267c1b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-08-05 10:52:53 +00:00
Orgad Shaneh
53cbc9d30c Git: Save silently on undo actions
If the user wants to undo, first save the file silently. Then the user is
still able to cancel the undo operation.

Task-number: QTCREATORBUG-16647
Change-Id: I61ac42ff41f3f7758d662692bc92850766beab8e
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-22 10:30:10 +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
7a5b45bdc2 Git: Limit blame range only for multiple lines selection
Selecting a word should not result in a single line blame...

Change-Id: I03e8b75c519eb555b77985e7c68b3429bfff9446
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-17 14:37:17 +00:00
Orgad Shaneh
3f879c0c79 Git: Use correct line numbers in limited range blame
Change-Id: I12f6fc77b532e5b01f2da6c1c1ff847445447c70
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-14 07:57:03 +00:00
Orgad Shaneh
b59f9fd0b9 Git: Support blame for selected lines
Task-number: QTCREATORBUG-16055
Change-Id: Ib24b6d41d5eb12aa0c4ec55377c02c8ae6ea914f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2016-06-03 07:41:46 +00:00
Orgad Shaneh
c52f278573 Git: Save only current document on Undo Uncommitted Changes
Task-number: QTCREATORBUG-15622
Change-Id: I9927a344976aa323701cad0a58550e27fa552c08
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-10 11:47:49 +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
Orgad Shaneh
b5987a6d49 Git: Require 1.8.0
Remove some workarounds for older versions

Git version in debian stable is 2.1.4, and in Ubuntu 14.04LTS is 1.9.1.

Change-Id: I8d558857a429149222b817401b98e90df10447b6
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-09 13:01:47 +00:00
Robert Loehning
aa4dd98be8 Git: Always enable "Actions on Commits..."
User can provide a path to the dialog so this can be handy even without
an open project or file.

Change-Id: I1ed96fe56b6ab76ca98f8d81ef60b217e66d0661
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-02-04 20:54:05 +00:00
Robert Loehning
fa3a35e346 Git: Make "Create Repository" action local
Change-Id: Id52d145ca6a8120fb28c6a800bfd4ac497e4260d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-02-03 16:30:15 +00:00
Orgad Shaneh
6fee5a88f3 Git: Support Git Grep
Task-number: QTCREATORBUG-3556
Change-Id: Ieca1bdaa39281a2e085340f045e5a48b875f7967
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-01-25 14:43:00 +00:00
Eike Ziller
a6f5548331 Git/Clean: Fix issues with submodules
- If the git config contained old entries for submodules that were
  removed (they are not cleaned from the config automatically),
  it would add submodules with empty "dir", which lead to infinite
  recursion

- When recursing into submodules, we need to prepend the paths from the
  git output with the relative path from the main repository

Change-Id: I0bc6a1973f4cdeb1c3f09c05cd7736c25471f72e
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-25 12:20:31 +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
Orgad Shaneh
70958c4c07 Git: Reduce indirection in submit editor
Change-Id: Ic4e897d5c8ec82dbbffd5bd9fe9af84491c4402f
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-06 10:08:34 +00:00
Alessandro Portale
033862f305 Themed Icons: Introduce Utils::Icon
Instead of describing icons via file name or in the themed icons case
via
a string that is a list of mask/color pairs, we have now a class for it.

Icons are now listed in per-plugin *icons.h headers.

RunControl::m_icon was The only place left where an icon property was in
fact a string. This patch changes that member to be a Utils::Icon.

Change-Id: Ibcfa8bb25e6d2e330c567ee7ccc0b97ead603177
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-11-25 12:30:52 +00:00
Tobias Hunger
7b3aa16dc6 Git: Use Qt5-style connects
The heavy lifting was done by clazy.

Change-Id: I60dcd378419b92f96dc681921701c9231ef8ee57
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-11-23 14:48:09 +00:00
Tobias Hunger
8f8c1052a2 Git: Simplify action creation methods
* Use a common method to do the basic setup for all the different
  actions.

Change-Id: I92e1d959c45e70c8145b7665dde8827edaf2331d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-11-23 13:42:32 +00:00
Tobias Hunger
a01a8e7452 Git: Simplify createChangeRelatedRepositoryAction
Change-Id: I0d374b071b73565bb3e48b4a1f32bc7baf988a28
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-11-23 13:42:18 +00:00
Tobias Hunger
dda9380052 Git: Simplify createRepositoryAction usages
Change-Id: I53047333e2591b9e2aca7931a1e809f99baf6f31
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-11-23 13:42:10 +00:00
Tobias Hunger
6a80b43e30 Git: Get rid of SLOTs for createProjectAction
Change-Id: Iee54656c54255912314ded0fa970e228b7e5d54c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-11-23 10:24:26 +00:00
Tobias Hunger
c3fdaa12e1 Git: Get rid of SLOTs for createFileAction
Change-Id: Idcdf20c6c9187103cfb6eb3172b3777f5dbe9876
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-11-23 09:47:16 +00:00
Tobias Hunger
6e9e8ebd14 Git: Simplify repository related action creation.
Change-Id: I4928e5424356f27af79999d39b2e2ea5a1440264
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-11-23 09:05:34 +00:00
hjk
56f9729a10 Git: Remove last user of Core::Id::fromUniqueIdentifier
Change-Id: I049a89a17341205275f68b22fe18234c756dec78
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-06-23 13:34:09 +00:00
Tobias Hunger
5a2459d1e1 VcsBase: Make some slots protected and update users accordingly
Change-Id: If38be72e9037126b6b697c5064a07de29a2ef8e5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-06-11 08:41:01 +00:00
Tobias Hunger
3d0b690d31 Git: Replace CloneWizard with a Json wizard
Change-Id: I2188c083665acc239bc98bf857ff57b071805fbc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-18 13:43:39 +00:00
Tobias Hunger
a55fb4a378 Vcs: Move annotate and annotateRevisionRequested into VcsBaseClientImpl
... and use that in the Git client.

Change-Id: Ie70ec0d5908776d11eb69613d45f565d4f0ce32b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-04-13 10:40:58 +00:00
Orgad Shaneh
4eb2224f47 Git: Add override
Change-Id: Iae0779c1efa8b3b46cf504f7bda00d614a4a157e
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2015-04-12 20:03:04 +00:00
Tobias Hunger
73a7732850 Vcs: Unify options pages for VcsBaseClientImpl based VCSes
Change-Id: Ia5dd7746f5857e7254251e3510c0987737cfad6d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-09 07:25:11 +00:00
Tobias Hunger
4f7844d6f5 Git: s/GitPlugin::gitClient/GitPlugin::client/
... same name as with almost all other plugins.

Change-Id: I964159044d86685735e8b1e816a0bf67e0576fd8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-08 09:52: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
Tobias Hunger
fb6d7ce91b Remove some duplicate includes
Change-Id: If7bae084cd34c6fb0fe77f9227d9848517c0e691
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-03-20 14:45:04 +00:00
Orgad Shaneh
9a1c382273 VCS: Remove dead stores
Change-Id: I998e523c76bdc0b76cbc6089092a0dda4812ca16
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2015-03-08 08:20:28 +00:00
Friedemann Kleint
54da18eaaa Clean exported headers of the Core plugin.
Change-Id: I26472d568844d5fee62323e01f5c5c12082d5450
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-03-05 07:18:14 +00:00
Orgad Shaneh
aee35662a2 Prefix duplicate names in Open Documents to make them unique
If a document has a file name associated with it then the prefix is
composed from path components (subdirectories), starting from the one
where the file is located and going up the parents until the resulting
name becomes unique among other open documents.

If a document doesn't have an associated file name, then a sequential
number (starting from 1) is appended to the display name of the
document.

This feature is useful when working with big projects that have lots
of idendical file names across different subdirectories (e.g.
Makefile.in, main.cpp, etc.) that need to be edited at the same
time. It allows to easily recognize such a file when switching
between documents in the editor, w/o the need to place the
mouse pointer over the name entry to get its full path.

Started-by: Dmitriy Kuminov <coding@dmik.org>
Task-number: QTCREATORBUG-10185
Change-Id: I633ea6d9b9b4fce8b67335dbcce1bda29254efde
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-26 14:56:25 +00:00
hjk
7f001dab1b Core: Make Context parameter to registerAction optional
... and default to C_GLOBAL. A rather common case.
Similar for ActionContainer::addSeparator().

Change-Id: I7f9ba573af201c0a472132d5a494ad17cc4175b7
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-26 10:09:03 +00:00
Eike Ziller
5a3a940ad3 Use new mime database
Change-Id: I4305872b6b11ef3e8a364280ffa5209a5a793600
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-17 13:00:07 +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
42e0ea62f6 Git: Support stash --keep-index
Task-number: QTCREATORBUG-13587
Change-Id: I23f62b961df73872ae980d95b91a3285c0e367c1
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-02-09 20:59:40 +00:00
Orgad Shaneh
2a677ce8b3 Git: Save all documents before stash pop
... and refresh the stash dialog

Change-Id: Iba16efc4f612cd1997493206704100ec57493932
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-02-09 20:59:32 +00:00
Orgad Shaneh
15e7446fda Git: Simplify stash
Change-Id: I2df6687d2bc539aa192dff53b4fb7936f20d299f
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-02-09 20:59:29 +00:00
Marco Bubke
cda1b6d246 Git: Use Core::AsynchronousMessageBox
Event loops can lead to crashes so it is better to use a dialog which has
not it's own event loop.

Change-Id: Ib703aad698f270b1fa491731adee131ad8b081e6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-02-09 20:53:14 +00: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
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Orgad Shaneh
c6a983d271 Core: Use FileName for file path in IDocument
Change-Id: I85f7398aee59d0d36f0e5c3bf88ff3c96002e394
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-01-12 10:23:37 +01:00
Orgad Shaneh
a4b4728267 VCS: Rework disabling of ambiguous actions
Task-number: QTCREATORBUG-13364
Change-Id: Ib9dc98964983f1a2808a89d90969089a09d2b55e
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2014-11-17 10:57:07 +01:00
Orgad Shaneh
e154e0f513 Git: Disable all actions when inactive
Except "Create Repository"

Change-Id: Ie012c3af349e0706e95b1cf09466a4f23c82c4d0
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2014-11-10 14:14:22 +01:00