1. 04 Dec, 2021 1 commit
    • Bernd Buschinski's avatar
      Fix meson executable · 2f723c97
      Bernd Buschinski authored
      - on my system meson is a link to python2-exec
        $ ls -ld $(which meson)
        /usr/bin/meson -> ../lib/python-exec/python-exec2
        The python2-exec must not be executed directly.
      - Currently the mesonExecutable is canonicalized, which also resolves symlinks
        This causes the meson plugin to execute stuff like:
        $ python2-exec --reconfigure
        instead of
        $ meson --reconfigure
        Fix this by not canonicalizing the mesonExecutable, validity is already checked earlier.
      
      BUG: 412477
      FIXED-IN: 5.8.220400
      2f723c97
  2. 03 Dec, 2021 3 commits
    • Igor Kushnir's avatar
      Prevent copying and moving ScopedDialog · 2f2db958
      Igor Kushnir authored
      https://ericniebler.com/2013/08/07/universal-references-and-the-copy-constructo
      describes the issue solved by this commit. The blog post recommends
      constraining the forwarding-reference constructor. But that solution
      would require much more code than added in this commit. Especially
      because the constraint would have to be expanded to support template
      parameter pack.
      
      The deleted constructor overloads prevent surprising and undesirable
      compilation of the following two code snippets:
          ScopedDialog<QDialog> s;
          ScopedDialog<QDialog> s2(s);
      and
          const ScopedDialog<QDialog> s;
          ScopedDialog<QDialog> s2(std::move(s));
      They were compiled successfully because the forwarding-reference
      constructor was a better match than the deleted copy and move
      constructor respectively (due to const-qualifier differences). In the
      forwarding-reference constructor invoked in these snippets, a reference
      to ScopedDialog `s` was implicitly converted to QDialog* and passed as a
      parent to `s2`'s new QDialog.
      
      The final specifier prevents surprising and undesirable compilation of
      the following code snippet (as well as the 3 other const and
      rvalue-reference variations of it):
      ```
      template <typename T> class ScopedDerived : public ScopedDialog<T> {};
      void f() {
          ScopedDerived<QDialog> s;
          ScopedDialog<QDialog> s2(s);
      }
      ```
      
      A volatile ScopedDialog (which does not make sense, by the way) cannot
      be copied or moved for another reason: passing volatile ScopedDialog as
      `this` argument to `operator DialogType*() const` discards qualifiers.
      2f2db958
    • Igor Kushnir's avatar
      ScopedDialog: Q_DISABLE_COPY => Q_DISABLE_COPY_MOVE · 8902428e
      Igor Kushnir authored
      Move constructor and move assignment operator have to be defaulted or
      deleted to follow the rule of five. ScopedDialog is supposed to live
      inside a specific scope, so moving it doesn't make sense. A similar
      class template QScopedPointer is also not movable. So let us define the
      move operations as deleted via Q_DISABLE_COPY_MOVE.
      
      Unlike Q_DISABLE_COPY, Q_DISABLE_COPY_MOVE prevents the forwarding
      constructor from acting as a move constructor. So the following code
          ScopedDialog<QDialog> s;
          ScopedDialog<QDialog> s2(std::move(s));
      compiled before, but does not compile at this commit.
      
      Move this declaration closer to other special member functions.
      8902428e
    • Igor Kushnir's avatar
      ScopedDialog: forward arguments to the dialog's constructor · 90a84519
      Igor Kushnir authored
      This change improves performance by doing less copying during
      construction. In addition the forwarding allows to pass non-copyable
      objects by reference.
      90a84519
  3. 27 Nov, 2021 1 commit
  4. 26 Nov, 2021 2 commits
    • Pedro Olsen Ferreira's avatar
      Replace QMutex(Recursive) with QRecursiveMutex · 7ffd5d48
      Pedro Olsen Ferreira authored and Igor Kushnir's avatar Igor Kushnir committed
      The declaration of QMutex(Recursive) is deprecated.
      This fixes several deprecation warnings.
      Many declarations had to be patched in order to return the correct
      constructs, because QRecursiveMutex is not convertible to QMutex.
      7ffd5d48
    • Igor Kushnir's avatar
      DocumentParsePlan: don't cache often-invalidated cend() · 38713121
      Igor Kushnir authored and Milian Wolff's avatar Milian Wolff committed
      The loop in DocumentParsePlan::removeTargetsForListener() caches
      m_targets.cend(), which can become invalidated when a target is erased
      inside this loop. Comparing to the invalidated end iterator leads to
      undefined behavior.
      
      This undefined behavior makes QmlJS's test_files crash every other time,
      both on my system and on the CI. The alternating crashes of this test
      can be seen by clicking Next Build repeatedly starting from the first
      build since the bug was introduced:
      https://build.kde.org/job/KDevelop/job/kdevelop/job/kf5-qt5%20SUSEQt5.15/165/testReport/junit/projectroot.plugins.qmljs/tests/test_files/
      
      KDevelop often crashes because of this undefined behavior too (see the
      bug report referenced below).
      
      m_targets is a QSet, which is implemented in terms of QHash. QHash's end
      iterator `e` equals the d-pointer `d` via anonymous union. So the only
      way cend() can be invalidated is if QSet::erase() detaches. That's
      possible, because an entire DocumentParsePlan is copied in
      BackgroundParserPrivate::parseDocumentsInternal():
          const DocumentParsePlan parsePlan = *parsePlanConstIt;
      The involvement of multithreading explains why test_files crashes every
      other time rather than each time. Examining call stacks of both
      test_files and kdevelop crashes confirms this hypothesis: a background
      thread crashes in DocumentParsePlan::removeTargetsForListener() while
      the main thread waits on the `m_mutex.lock()` line in
      parseDocumentsInternal().
      
      This bug was introduced in 5ee9b9fe.
      
      BUG: 445699
      38713121
  5. 24 Nov, 2021 1 commit
  6. 23 Nov, 2021 1 commit
  7. 21 Nov, 2021 1 commit
  8. 17 Nov, 2021 1 commit
  9. 16 Nov, 2021 1 commit
    • Eugene Shalygin's avatar
      Fix the app shell script to run with zsh · f3bde6dc
      Eugene Shalygin authored
      Do not repeat shell test in the kdevplatform_shell_environment.sh file,
      but instead detect the shell which runs the script via ps and $$. The
      testing and shell selection is done by the app/kdevelop! script.
      
      Fix tests for executables: which is a builtin in zsh and output
      redirestion does not work with it. Replace such tests with command -v,
      for which POSIX defines behaviour and return values.
      
      BUG: 442481
      FIXED-IN: 5.7.0
      f3bde6dc
  10. 15 Nov, 2021 3 commits
    • Jonathan L. Verner's avatar
      Fix goto source for summary diffs · d3d8a384
      Jonathan L. Verner authored and Igor Kushnir's avatar Igor Kushnir committed
      Previously, the goto source shortcut for summary diffs (e.g. diffs showing
      all staged changes) would not work. The reason was that
      the view data structure member url contained only the path to the project
      root. This commit changes
      
        1. modifies the vcsDiff api diffLineToSource/Target
           to return relative source paths together with source lines
        2. uses the result together with the project root to compute
           the url to the path in the shortcut handler.
      d3d8a384
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · 0aa6d824
      Script Kiddy authored
      In case of conflict in i18n, keep the version of the branch "ours"
      To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
      0aa6d824
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · 2702258d
      Script Kiddy authored
      In case of conflict in i18n, keep the version of the branch "ours"
      To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
      2702258d
  11. 13 Nov, 2021 5 commits
    • Igor Kushnir's avatar
      VCS tests: global QString constants => data members · d97110a1
      Igor Kushnir authored
      Initialize m_plugin with nullptr.
      
      Simplify the expression assigned to perforceTestBaseDir.
      
      The temporary directories are created before and removed after each test
      function. This makes switching to QTemporaryDir more difficult and less
      useful => retain QDir::tempPath() for the time being.
      d97110a1
    • Igor Kushnir's avatar
      VCS tests: remove unused *BaseDir2 variables · 9b819006
      Igor Kushnir authored
      These directories were created and removed but never used.
      
      PerforcePluginTest::removeTempDirsIfAny() attempted to remove
      perforceTestBaseDir twice because of what was almost certainly a typo.
      perforceTestBaseDir2 was supposed to be removed there, but it is better
      to never create and never remove this unused directory.
      9b819006
    • Igor Kushnir's avatar
      ItemRepositoryTestBase: delete the test repository during cleanup · 7af21c6c
      Igor Kushnir authored
      ItemRepositoryRegistry::deleteRepositoryFromDisk() only marks the
      repository for removal. Call ItemRepositoryRegistry::shutdown() to
      actually remove the files when done testing. Even though QTemporaryDir
      already removes the directory with all repository files in it, let us
      shut down the repositories properly to test their cleanup too.
      7af21c6c
    • Igor Kushnir's avatar
      Extract common test code and use QTemporaryDir · 5c6d6389
      Igor Kushnir authored
      The temporary directory and files are now removed at test/bench exit.
      5c6d6389
    • Igor Kushnir's avatar
      TestQMakeProject: use QTemporaryDir instead of /tmp · 518cdc62
      Igor Kushnir authored
      test_qmakeproject creates /tmp/some/path. After the test exits, this
      directory still exists, contains an empty directory "build" and two
      non-empty files (.qmake.stash and Makefile).
      
      This change brings two improvements:
      * the temporary directory path is no longer hardcoded;
      * the temporary files and directories are removed at test exit.
      518cdc62
  12. 12 Nov, 2021 10 commits
    • Igor Kushnir's avatar
      Optimize LanguageController's MimeTypeCache: QMultiHash suffixes · 49c41c2b
      Igor Kushnir authored
      The performance gains are not very significant, but the code becomes
      shorter as well, so there seem to be no drawbacks to this change.
      
      Average BenchLanguageController results before and at this commit in
      milliseconds per iteration:
              Data row                    Before      At
      1. benchLanguagesForUrlNoCache()
          CMakeLists                      0.00045     0.00046
          cmakelists wrong case           0.00045     0.00046
          lower-case                      0.00045     0.00040
          upper-case                      0.00045     0.00039
          mixed-case                      0.00045     0.00040
          .C                              0.00037     0.00040
          .cl                             0.00038     0.00038
          existent C with extension       0.00043     0.00045
          .cc                             0.00040     0.00039
          .cmake                          0.00041     0.00044
          .diff                           0.00038     0.00040
          .qml                            0.00037     0.00039
          existent C w/o extension        0.16        0.16
          existent patch w/o extension    0.20        0.20
      2. benchLanguagesForUrlFilledCache()
          CMakeLists                      0.00048     0.00050
          cmakelists wrong case           0.00049     0.00050
          lower-case                      0.00048     0.00041
          upper-case                      0.00049     0.00041
          mixed-case                      0.00049     0.00042
          .C                              0.00041     0.00042
          .cl                             0.00045     0.00042
          existent C with extension       0.00047     0.00047
          .cc                             0.00044     0.00041
          .cmake                          0.00042     0.00043
          .diff                           0.00041     0.00041
          .qml                            0.00045     0.00043
          existent C w/o extension        0.16        0.16
          existent patch w/o extension    0.20        0.20
      
      Note: benchLanguagesForUrlNoMatch*() benchmark results are practically
      unaffected by this commit because the QMimeDatabase::mimeTypeForFile()
      call is orders of magnitude slower than the
      MimeTypeCache::languagesForFileName() call optimized here.
      
      The benchmarks run slightly faster on average now.
      benchLanguagesForUrlFilledCache(), which is closest to the real-life
      LanguageController usage in KDevelop, got a 14% speedup for the common
      *.cpp pattern data rows ("lower-case", "upper-case" and "mixed-case").
      49c41c2b
    • Igor Kushnir's avatar
      Optimize LanguageController's MimeTypeCache · 59270583
      Igor Kushnir authored
      Previously the filename of each url argument to
      LanguageController::languagesForUrl() was matched against all cached
      glob pattern suffixes (sometimes not "all" as suffixes of an already
      matched/added language were skipped). Now the filename is only matched
      against the suffixes that end with the same case-insensitive character.
      This change should improve the performance of this frequently called
      function, because case-insensitive string comparison looks like the most
      expensive among the actually performed in practice operations in cases
      when the language is found in mimeTypeCache.
      
      Suffix matching performance could be further improved by storing reverse
      suffixes in a trie (aka prefix tree). However I could not find a
      suitable trie implementation in KDevelop or one of its dependencies.
      QmlJS::PersistentTrie seems to be the closest match, but it has many
      unneeded features and stores only strings with no ability to attach
      user data to them (such as ILanguageSupport*). Implementing a trie data
      structure specifically for this optimization would be an overkill.
      
      For some reason, using std::lower_bound in place of std::equal_range in
      MimeTypeCache::languagesForFileName() makes the most important benchmark
      - benchLanguagesForUrlFilledCache() - somewhat slower on most data rows.
      
      I have implemented and benchmarked 3 alternative optimizations of suffix
      matching in MimeTypeCache::languagesForFileName():
        1. Binary searching for the last fileName's extension in the
           std::vector<StringLanguagePair> sorted by the entire last extension
           string case-insensitively.
        2. Binary searching for lower-cased last fileName's extension in the
           lower-cased std::vector<StringLanguagePair> sorted by the entire
           last extension string case-sensitively.
        3. Looking up lower-cased last fileName's extension in lower-cased
           QMultiHash<QString, ILanguageSupport*>.
      
      The second alternative optimization turned out to be faster than the
      first one; the third - faster than the second one.
      
      All 3 alternative optimizations turned out to be:
      a) Less general than this version: multiple extensions, such as tar.gz,
         were no longer optimized. This is only a theoretical downside because
         none of the maintained KDevelop plugins supports wildcard patterns
         with multiple extensions.
      b) Slower than this version. Probably because of expensive temporary
         QString construction - the (lower-cased) last fileName's extension.
      
      There is currently no need to optimize literal pattern matching, because
      only one literal pattern is supported: "CMakeLists.txt". If more literal
      patterns become supported in the future, the elements of
      MimeTypeCache::m_literalPatterns can be easily lower-cased and sorted to
      speed up matching against them.
      
      Average BenchLanguageController results before and at this commit in
      milliseconds per iteration:
              Data row                    Before      At
      1. benchLanguagesForUrlNoCache()
          CMakeLists                      0.00046     0.00045
          cmakelists wrong case           0.00046     0.00045
          lower-case                      0.00058     0.00045
          upper-case                      0.00058     0.00045
          mixed-case                      0.00058     0.00046
          .C                              0.00050     0.00039
          .cl                             0.00070     0.00038
          existent C with extension       0.00053     0.00044
          .cc                             0.00058     0.00041
          .cmake                          0.00039     0.00041
          .diff                           0.00037     0.00038
          .qml                            0.00036     0.00037
          existent C w/o extension        0.16        0.16
          existent patch w/o extension    0.20        0.20
      2. benchLanguagesForUrlFilledCache()
          CMakeLists                      0.0011      0.00050
          cmakelists wrong case           0.0011      0.00050
          lower-case                      0.00083     0.00048
          upper-case                      0.00083     0.00048
          mixed-case                      0.00085     0.00048
          .C                              0.00072     0.00040
          .cl                             0.00091     0.00042
          existent C with extension       0.00064     0.00046
          .cc                             0.00080     0.00043
          .cmake                          0.00090     0.00042
          .diff                           0.00083     0.00041
          .qml                            0.00093     0.00045
          existent C w/o extension        0.16        0.16
          existent patch w/o extension    0.20        0.20
      3. benchLanguagesForUrlNoMatchNoCache()
          empty                           0.0016      0.000013
      4. benchLanguagesForUrlNoMatchFilledCache()
          empty                           0.0018      0.000013
      
      Note: benchLanguagesForUrlNoMatch*() benchmark results are practically
      unaffected by this commit because the QMimeDatabase::mimeTypeForFile()
      call is orders of magnitude slower than the
      MimeTypeCache::languagesForFileName() call optimized here. The only
      exception is the "empty" data row, which became more than 100 times
      faster thanks to the added early return.
      
      Most benchmarks run faster now. benchLanguagesForUrlFilledCache(), which
      is closest to the real-life LanguageController usage in KDevelop, runs
      about two times faster thanks to this commit.
      59270583
    • Igor Kushnir's avatar
      Fix and improve LanguageController's MimeTypeCache · 025e4fa9
      Igor Kushnir authored
      Bugs in the old implementation that are fixed in this commit:
        * The regular expression matching code was incorrect and so it never
      matched the only pattern it handled: "CMakeLists.txt". As a result,
      LanguageController::languagesForUrl(".../CMakeLists.txt") returned an
      empty language list in background threads; resorted to extra work
      culminating in a call to LanguageController::languagesForMimetype() in
      the main thread.
        * The suffix matching optimization matched patterns case-sensitively
      and so didn't match names like "X.CPP". As with the regular expression
      matching bug, this resulted in a wrong return value in background
      threads and extra work in the main thread.
        * The suffix matching optimization assumed that '*' is the only
      wildcard character. While this is actually the case for glob patterns of
      the mime types that can currently end up in mimeTypeCache, it might have
      led to a surprising bug if more complex glob patterns became supported
      in the future.
      
      TestLanguageController::testLanguagesForUrlWithCache() fails on the
      following data rows without this commit because of these bugs:
        - CMakeLists
        - cmakelists wrong case
        - upper-case
        - mixed-case
      
      Improvements of the MimeTypeCache reimplementation in this commit:
        * Literal pattern optimization: "CMakeLists.txt" was the only pattern
      that required regular expression matching in the old implementation. It
      could not be handled by the suffix matching optimization. Now the new
      separate pattern category m_literalPatterns handles this case so that
      the slower regular expression matching never happens in practice.
        * The suffixes, literal patterns and regular expressions are now
      created once and cached rather than constructed in each
      languagesForUrl() call.
        * QRegularExpression is now used instead of the deprecated QRegExp.
      
      This is the list of wildcard patterns supported by maintained KDevelop
      plugins (collated from X-KDevelop-SupportedMimeTypes plugin entries and
      /usr/share/mime/globs2):
      kdevclangsupport
          text/x-chdr
              *.h
          text/x-c++hdr
              *.hh
              *.hpp
              *.hp
              *.h++
              *.hxx
          text/x-csrc
              *.c:cs
          text/x-c++src
              *.c++
              *.cc
              *.cxx
              *.C:cs
              *.cpp
          text/x-opencl-src
              *.cl
          text/vnd.nvidia.cuda.csrc
              *.cu
          text/vnd.nvidia.cuda.chdr
              *.cuh
          text/x-objcsrc
              *.m
      kdevpatchreview
          text/x-patch
              *.patch
              *.diff
      kdevqmljs
          text/x-qml
              *.qml
              *.qmlproject
              *.qmltypes
          application/javascript
              *.jsm
              *.mjs
              *.js
      KDevCMakeManager
          text/x-cmake
              cmakelists.txt
              *.cmake
      KDevCssSupport
          text/css
              *.css
          text/html
              *.html
              *.htm
      KDevPhpSupport
          application/x-php
              *.phps
              *.php
              *.php3
              *.php4
              *.php5
      kdevpythonsupport
          text/x-python
              *.wsgi
              *.py
              *.pyx
          text/x-python3
              *.py3x
              *.py3
              *.py
      KDevRubySupport
          application/x-ruby
              *.rb
      
      Only *.c and *.C out of all supported patterns should be matched
      case-sensitively. But both of these patterns belong to the same plugin -
      kdevclangsupport. So LanguageController can safely match all patterns
      case-insensitively. See also
      https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html
      
      Average BenchLanguageController results before and at this commit in
      milliseconds per iteration:
              Data row                    Before      At
      1. benchLanguagesForUrlNoCache()
          CMakeLists                      0.029       0.00046
          cmakelists wrong case           0.029       0.00046
          lower-case                      0.0023      0.00058
          upper-case                      0.029       0.00058
          mixed-case                      0.029       0.00058
          .C                              0.0023      0.00050
          .cl                             0.0023      0.00070
          existent C with extension       0.0022      0.00053
          .cc                             0.0023      0.00058
          .cmake                          0.0016      0.00039
          .diff                           0.00094     0.00037
          .qml                            0.0012      0.00036
          existent C w/o extension        0.16        0.16
          existent patch w/o extension    0.20        0.20
      2. benchLanguagesForUrlFilledCache()
          CMakeLists                      0.032       0.0011
          cmakelists wrong case           0.031       0.0011
          lower-case                      0.0039      0.00083
          upper-case                      0.030       0.00083
          mixed-case                      0.030       0.00085
          .C                              0.0039      0.00072
          .cl                             0.0039      0.00091
          existent C with extension       0.0038      0.00064
          .cc                             0.0039      0.00080
          .cmake                          0.0039      0.00090
          .diff                           0.0039      0.00083
          .qml                            0.0039      0.00093
          existent C w/o extension        0.16        0.16
          existent patch w/o extension    0.20        0.20
      3. benchLanguagesForUrlNoMatchNoCache()
          empty                           0.0021      0.0016
          archive                         0.024       0.023
          OpenDocument Text               0.024       0.023
          existent archive with extension 0.030       0.029
          existent archive w/o extension  0.15        0.15
      4. benchLanguagesForUrlNoMatchFilledCache()
          empty                           0.0054      0.0018
          archive                         0.029       0.024
          OpenDocument Text               0.029       0.024
          existent archive with extension 0.035       0.030
          existent archive w/o extension  0.16        0.15
      
      Almost every benchmark runs faster now. Many run more than ten times
      faster thanks to this commit.
      025e4fa9
    • Igor Kushnir's avatar
      Test and benchmark LanguageController::languagesForUrl() · 1fedf941
      Igor Kushnir authored
      LanguageController's initialize() and cleanup() member functions were
      called once each by Core and didn't reset LanguageController's state.
      This commit expands the definition of initialize() to make these two
      member functions work for the added tests. Most of the added code
      belongs in cleanup(), but moving it there seems a bit risky: what if
      this data is used at KDevelop exit?
      1fedf941
    • Igor Kushnir's avatar
      Fix BenchItemRepository's header guard · 16cc7b87
      Igor Kushnir authored
      GIT_SILENT
      16cc7b87
    • Albert Astals Cid's avatar
      f1c93f7d
    • Albert Astals Cid's avatar
      Add missing kdoctools_install · d075fdd4
      Albert Astals Cid authored
      d075fdd4
    • Jonathan L. Verner's avatar
      Add refresh action to git more commit toolview ctx menus · 14852cda
      Jonathan L. Verner authored and Igor Kushnir's avatar Igor Kushnir committed
      Before, when an element in one of the categories (staged/unstaged/...)
      was selected, its context menu didn't have the refresh repo action. This
      was not very convenient, since one had to first unselect the element and
      then trigger the context menu again, when the repo model was out of date.
      This commit fixes this minor annoyance.
      
      (cherry picked from commit d660f70c)
      14852cda
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · 21831335
      Script Kiddy authored
      In case of conflict in i18n, keep the version of the branch "ours"
      To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
      21831335
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · a43cd4f2
      Script Kiddy authored
      In case of conflict in i18n, keep the version of the branch "ours"
      To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
      a43cd4f2
  13. 11 Nov, 2021 7 commits
    • Igor Kushnir's avatar
      Merge branch 'release/21.12' · 40b3ccea
      Igor Kushnir authored
      40b3ccea
    • Igor Kushnir's avatar
      ClangSupport: override indentationSample() · 32b8692d
      Igor Kushnir authored
      ILanguageSupport::indentationSample() is used in a single place:
      CustomScriptPlugin::computeIndentationFromSample(), which in turn is
      used only in CustomScriptPlugin::indentation(). When indentationSample()
      returns an empty string (as the base class implementation does),
      CustomScriptPlugin::indentation() fails and returns invalid Indentation.
      
      f31d32f4 removed CppLanguageSupport,
      which was the only class that overrode indentationSample(). Not copying
      this override into ClangSupport was probably a mistake. This commit
      copies the last version of CppLanguageSupport::indentationSample() into
      ClangSupport::indentationSample(). The copied sample matches the example
      in the documentation for ILanguageSupport::indentationSample().
      32b8692d
    • Jonathan L. Verner's avatar
    • Jonathan L. Verner's avatar
      Disable the commit form when no project is selected · 484db487
      Jonathan L. Verner authored
      Upon startup, when no project was initially selected, the commit form was
      previously enabled (however, pressing the commit button didn't work). This
      commit initially disables the commit form and only enables it after a user
      has selected a project from the tree in the git commit toolview.
      484db487
    • Jonathan L. Verner's avatar
      Show an error message in the git commit view when committing fails · a99c312f
      Jonathan L. Verner authored
      When committing fails, the user should be informed (and not expected to
      notice this by seeing an error in the Version Control output view or knowing
      commit message not being cleared means failure).
      
      I opted to use a KMessageWidget instead of a Modal Dialog (per the HIG guidelines,
      although they are a bit unclear, since there is no clear action that the
      user can take to remedy the situation).
      
      I also opted for just a short message pointing the user to the Version Control
      output view for more information due to the limited space available in the
      commit toolview.
      
      BUG: 443475
      FIXED-IN: 5.7.0
      a99c312f
    • BogDan Vatra's avatar
      Fix some QtCreator shortcuts · a7901dc4
      BogDan Vatra authored and Igor Kushnir's avatar Igor Kushnir committed
      a7901dc4
    • Jonathan L. Verner's avatar
      Enable the commit form after git commit failure · 30490733
      Jonathan L. Verner authored
      This fixes a bug which would lead to the commit form being disabled and
      unusable when a commit failed for some reason.
      
      The commit form was disabled when the commit job started and was meant to
      be enabled when the job finished. However, the wrong signal was connected
      to, which meant that in case of failure the code never ran.
      
      BUG: 443475
      FIXED-IN: 5.7.0
      30490733
  14. 10 Nov, 2021 3 commits
    • Jonathan L. Verner's avatar
      Add refresh action to git more commit toolview ctx menus · d660f70c
      Jonathan L. Verner authored and Milian Wolff's avatar Milian Wolff committed
      Before, when an element in one of the categories (staged/unstaged/...)
      was selected, its context menu didn't have the refresh repo action. This
      was not very convenient, since one had to first unselect the element and
      then trigger the context menu again, when the repo model was out of date.
      This commit fixes this minor annoyance.
      d660f70c
    • Igor Kushnir's avatar
      ISourceFormatter::formatSourceWithStyle: take style by reference · 32c8bbeb
      Igor Kushnir authored
      This should be faster than copying SourceFormatterStyle at each call of
      this function.
      
      Introduce a QString styleContent variable in
      CustomScriptPlugin::formatSourceWithStyle() for these reasons:
      * style is now a reference to const and cannot be assigned to;
      * the name of an incomplete style matches the name of the corresponding
        predefined style, so using unmodified style.name() below is correct;
      * QString content() is the only other member of style used below.
      
      Reformat the lines touched by this change.
      
      Don't refer to the previous name of kdevcustomscript plugin "indent" in
      the warning message touched by this change.
      32c8bbeb
    • Kai Stierand's avatar
      Improve performance when queueing documents for parsing · 5ee9b9fe
      Kai Stierand authored and Milian Wolff's avatar Milian Wolff committed
      I'm working with a project that has more than 1400 Unit-Tests and they are all in a single executable. This causes CTestFindJob to queue each c++ File compiled into the test executable more than 1400 times. We might probably want to change something about that, but that is a bit more work; Therefore I chose to get the low hanging fruits. These changes improve the queuing performance by a factor of approx. 10. For my project this means roughly 3 Seconds of waiting instead of more than 30 Seconds before the change.
      5ee9b9fe