1. 04 Dec, 2020 5 commits
    • Milian Wolff's avatar
      Only index the context once · 225d73e8
      Milian Wolff authored
    • Milian Wolff's avatar
      QMap -> QHash · 04946b00
      Milian Wolff authored
      Order isn't important for these maps, use the faster hash instead.
    • Milian Wolff's avatar
    • Milian Wolff's avatar
      Don't leak memory in test_astyle · a038ccd9
      Milian Wolff authored
      Fixes various LSAN reports
    • Milian Wolff's avatar
      Fix UB in UI controller usage for NoUi tests · 5e0d22c6
      Milian Wolff authored
      Only connect to qApp in init and disconnect in cleanup.
      Then don't call cleanup in NoUi tests.
      Fixes UBSAN report:
      /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/shell/uicontroller.cpp:241:16: runtime error: downcast of address 0x7f30c868a1c0 which does not point to an object of type 'QApplication'
      0x7f30c868a1c0: note: object is of type 'QCoreApplication'
       00 00 00 00  f0 4f 59 de 30 7f 00 00  e0 55 02 00 e0 60 00 00  00 00 00 00 00 00 00 00  00 00 00 00
                    vptr for 'QCoreApplication'
          #0 0x7f30eeacada3 in KDevelop::UiController::~UiController() /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/shell/uicontroller.cpp:241
          #1 0x7f30eeacb874 in KDevelop::UiController::~UiController() /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/shell/uicontroller.cpp:242
          #2 0x7f30eea745d3 in KDevelop::CorePrivate::~CorePrivate() /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/shell/core.cpp:279
          #3 0x7f30eea7f4be in KDevelop::Core::~Core() /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/shell/core.cpp:330
          #4 0x7f30f1250435 in KDevelop::TestCore::~TestCore() kdevplatform/tests/KDevPlatformTests_autogen/EWIEGA46WW/../../../../../../../../src/extragear/kdevelop/kdevelop/kdevplatform/tests/testcore.h:75
          #5 0x7f30f1250435 in KDevelop::TestCore::~TestCore() kdevplatform/tests/KDevPlatformTests_autogen/EWIEGA46WW/../../../../../../../../src/extragear/kdevelop/kdevelop/kdevplatform/tests/testcore.h:75
          #6 0x7f30de32a33f in QObject::event(QEvent*) (/usr/lib/libQt5Core.so.5+0x2e233f)
          #7 0x7f30de2fda4f in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib/libQt5Core.so.5+0x2b5a4f)
          #8 0x7f30de300572 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (/usr/lib/libQt5Core.so.5+0x2b8572)
          #9 0x7f30de3522dd in QTest::qWait(int) (/usr/lib/libQt5Core.so.5+0x30a2dd)
          #10 0x7f30f1279cef in KDevelop::TestCore::shutdown() /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/tests/testcore.cpp:99
  2. 03 Dec, 2020 1 commit
  3. 02 Dec, 2020 4 commits
    • Milian Wolff's avatar
      Don't warn about potentially unused function · 0e1838c9
      Milian Wolff authored
      It's used in debug builds
    • Milian Wolff's avatar
      kdev-clang: selectively apply ForceUpdate to the requested document · 8edea338
      Milian Wolff authored
      When we get a parse job with the ForceUpdate flag set, we used to
      apply this flag to all imports. So basically ForceUpdateRecursive
      and ForceUpdate where handled in the same way, which is obviously
      not a good idea.
      Instead, track the document for which the parse job got created and
      only apply ForceUpdate to that one.
      This greatly improves the performance of reparsing after switching
      git branches or using git stash: These actions would always trigger
      a document reload and a parse job is created with ForceUpdate set.
      Previously, this then meant that we reparsed all imports too. For
      files with many imports, this was extremely slow and totally unneeded.
      As an example: Editing heaptrack's accumulatedtracedata.cpp and then
      applying `git stash` tackes ~34s on my machine before this patch. With
      this patch, it only takes ~200ms instead.
    • Milian Wolff's avatar
      kdev-clang: properly track modification revisions of imported files · ef28c644
      Milian Wolff authored
      The previous code only ever tracked the the modification revision
      of a file itself, but not of the files it imported. Now, we actually
      do that, which ensures we automatically reparse a file when one of
      its imports has changed.
    • Milian Wolff's avatar
      Use QFileInfo::canonicalFilePath instead of QDir::canonicalPath · e8923578
      Milian Wolff authored
      The path is to a file, not to a dir, so it's pretty odd that we
      used QDir here.
  4. 28 Nov, 2020 4 commits
  5. 22 Nov, 2020 1 commit
  6. 20 Nov, 2020 1 commit
  7. 17 Nov, 2020 1 commit
  8. 16 Nov, 2020 1 commit
  9. 15 Nov, 2020 4 commits
  10. 14 Nov, 2020 4 commits
    • Igor Kushnir's avatar
      Make all DUChainReferenceCounting globals thread_local · 3c7257e5
      Igor Kushnir authored
      Move the variables into a simple new DUChainReferenceCounting class to
      avoid the repetition of the `thread_local` keyword.
      Reorder the declarations and initializations of two variables -
      refCountingHasAdditionalRanges and refCountingRanges - to minimize
      sizeof(DUChainReferenceCounting) while preserving the logic of the
      variable ordering and grouping within the class.
      Eliminate the mutex and the redundant dependency between threads.
      This should work perfectly if the reference counting of each object is
      confined to a single thread. This will break code that calls
      DUChainReferenceCounting functions on the same object from multiple
      threads. Hopefully such code does not exist.
      This change does not break any kdevelop or kdev-python tests.
    • Igor Kushnir's avatar
      Make the global variable doReferenceCounting thread_local · db67d592
      Igor Kushnir authored
      This variable is accessed concurrently from multiple threads. It is
      written to under a mutex lock, but read from without any thread
      synchronization. Therefore the variable has to be either atomic or
      thread_local to prevent data races.
      As far as I can tell, the variable's value is never intended to be
      shared with other threads. If one thread temporarily sets
      doReferenceCounting to true, and then another thread reads the variable
      before the first thread resets it to false, there is redundant mutex
      locking. If this other thread then (redundantly) sets
      doReferenceCounting to true, performs some operation and resets it to
      false; then the first thread reads this variable again, some necessary
      checks and steps can be skipped in the first thread. So thread_local
      seems to be the more correct and performant alternative.
      This change does not break any kdevelop or kdev-python tests.
    • Igor Kushnir's avatar
      Use std::as_const in place of custom make_const · 46158d1a
      Igor Kushnir authored
    • Bernd Buschinski's avatar
      Fix excessive KPassivePopup usage in case of debugger errors · 8fca91a0
      Bernd Buschinski authored
      - Group duplicate error messages
      - Port to KNotification
      - This fixes a kwin_x11 crash for some X11 drivers
  11. 11 Nov, 2020 1 commit
  12. 10 Nov, 2020 1 commit
  13. 09 Nov, 2020 1 commit
  14. 07 Nov, 2020 1 commit
  15. 05 Nov, 2020 1 commit
  16. 04 Nov, 2020 4 commits
  17. 01 Nov, 2020 2 commits
  18. 30 Oct, 2020 3 commits