1. 11 Mar, 2019 2 commits
  2. 08 Mar, 2019 2 commits
  3. 07 Mar, 2019 2 commits
  4. 02 Mar, 2019 1 commit
  5. 25 Feb, 2019 2 commits
  6. 24 Feb, 2019 1 commit
  7. 21 Feb, 2019 1 commit
    • Rolf Eike Beer's avatar
      optimize CMakeBuildDirChooser::buildDirSettings() · 5bf2c3aa
      Rolf Eike Beer authored and Rolf Eike Beer's avatar Rolf Eike Beer committed
      -if we have a match for a key, no other key can match
      -match the start of a new line as QByteArray instead of QString, most lines will
       not match and all keys are plain ASCII, this saves a lot of needless
       conversions and memory allocations
      -modify the original line instead of doing a copy, the original one will not
       be used again anyway.
      Test Plan: Open and build a CMake-based project.
      Reviewers: mwolff
      Reviewed By: mwolff
      Subscribers: mwolff, apol, kdevelop-devel
      Tags: #kdevelop
      Differential Revision: https://phabricator.kde.org/D18857
  8. 19 Feb, 2019 3 commits
  9. 16 Feb, 2019 2 commits
  10. 15 Feb, 2019 10 commits
    • Milian Wolff's avatar
      Introduce QuickOpenEmbeddedWidgetCombiner · d284d5bb
      Milian Wolff authored
      This mouthful of a class is essentially just a QWidget with a
      QVBoxLayout which you can add widgets to. The fun comes from
      implementing the QuickOpenEmbeddedWidgetInterface too, by
      delegating to the child widgets that got added.
      Overall, this allows us to navigate via Alt+Arrow keyboard actions
      between combined widgets, as you'd get when you have both, an error
      and a declaration at a given cursor declaration.
    • Milian Wolff's avatar
      Add 'back' to QuickOpenEmbeddedWidgetInterface · 35277af9
      Milian Wolff authored
      The AbstractNavigationWidget already supported this, and it was
      picked up by KTextEditor. But our own quickopen embedded widget
      interface didn't allow going 'back' via Alt + Backspace yet. This
      patch fixes this.
    • Milian Wolff's avatar
    • Milian Wolff's avatar
      tie DUContext::createNavigationWidget to AbstractNavigationWidget · d9b4c14c
      Milian Wolff authored
      We always return instances of this type anyways, so enforce it in
      the API and simplify the usage code accordingly.
    • Milian Wolff's avatar
      Fix up/down keyboard navigation for 'Show documentation' links · f633da0d
      Milian Wolff authored
      The navigation widget relies on a crude HTML "parser" which
      counts "lines". Yes. Only '<br/>' is considered a newline, even
      though due to line wrapping we can have obviously more lines. Well,
      without rewriting all of that, also count '</p>' as introducing a
      new line. This allows us to jump to the 'Show documentation' link
      To make this work reliably, we also fixup the generated HTML to be
      valid and not nest '<p>' tags. Furthermore, we prevent the ugly
      line indication marker '<->' being shown when we try to down past
      the last paragraph.
    • Milian Wolff's avatar
      Lock duchain in AbstractIncludeNavigationContext::html · 38e910ba
      Milian Wolff authored
      Fixes assertion when trying to navigate in project file
      quick open navigation widget:
      #9  0x00007fc05e472c28 in qt_assert(char const*, char const*, int) () from /usr/lib/libQt5Core.so.5
      #10 0x00007fc061696c26 in KDevelop::TopDUContext::importedParentContexts (this=0x561284615030) at /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/language/duchain/topducontext.cpp:1015
      #11 0x00007fc0617883cc in KDevelop::pickContextWithData (duchains=..., maxDepth=2, type=@0x561287177ac0: KDevelop::StandardParsingEnvironment, forcePick=true) at /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/language/duchain/navigation/abstractincludenavigationcontext.cpp:60
      #12 0x00007fc061788815 in KDevelop::AbstractIncludeNavigationContext::html (this=0x561287177aa0, shorten=false) at /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/language/duchain/navigation/abstractincludenavigationcontext.cpp:90
      #13 0x00007fc0617752fb in KDevelop::AbstractNavigationContext::down (this=0x561287177aa0) at /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/language/duchain/navigation/abstractnavigationcontext.cpp:282
    • Milian Wolff's avatar
      cleanup: remove html prefix/suffix feature from navigation widget · 12e3583f
      Milian Wolff authored
      This was *only* being used by the project file quickopen feature,
      and you only saw it when clicking into the quickopen list, or when
      pressing alt. I doubt anyone ever did that. And it was madness
      anyways: we decreased the font size in a hacky non-html compliant
      way which actually made it quite hard to read for me. So the only
      thing we lose is the project name... which is an acceptable
      tradeoff. This feature messed up the whole API considerably, removing
      it makes me very happy.
      We can bring back the project name in the future by introducing a
      generic wrapper-widget that supports the
    • Milian Wolff's avatar
      Remove dead code: AbstractNavigationContext::fontSize{Prefix,Suffix} · 518e7871
      Milian Wolff authored
      These functions never return any non-null string, so just remove them.
    • Milian Wolff's avatar
      Reinstantiate c3c30113 "fix memleaks in duchain unittests" · 333455ce
      Milian Wolff authored
      We also lost this, thanks to Nicolas for pointing this out!
    • Milian Wolff's avatar
      Reinstantiate code from 3c51faa2 · ba7f235b
      Milian Wolff authored
      Fixes test_duchain-clang's testSameFunctionDefinition. My git foo
      isn't good enough to figure out where this got lost?
  11. 13 Feb, 2019 8 commits
    • Milian Wolff's avatar
      Delay handling of KDirWatch signals · c7b8e797
      Milian Wolff authored
      This is a workaround for bug 404184, where KDirWatch only emits
      a 'deleted' signal during a 'git stash' workflow, which never
      gets paired by a 'created' signal, even though the file actually
      exists before and after the 'git stash' operation.
      By delaying the handling of the KDirWatch signals, we won't fall
      into the trap of removing a file even though it actually exists.
      Since it doesn't really matter how fast we react on such events,
      it's in my opinion fine to delay it for a full second. Having a
      correct state is much more important than having any state fast.
      Without this patch, KDevelop frequently forgets about files from large
      projects I work on after a `git stash`. This then fubars the C++
      support completely, since it cannot find any include paths and
      defines anymore.
    • Milian Wolff's avatar
      Cleanup test_projectload.cpp code · 8933d890
      Milian Wolff authored
      Reuse the createFile helper, simplify a few places of code and remove
      the unused exec function.
    • Milian Wolff's avatar
      Simplify: use QTRY_* instead of manual waiting · 7661c472
      Milian Wolff authored
      This is usually less code and has the chance to run faster when
      the result comes in before our hardcoded previous timeout.
    • Milian Wolff's avatar
      Remove obsolete code · 1a740ec2
      Milian Wolff authored
      We already cleanup old projects in TestProjectLoad::init
    • Milian Wolff's avatar
      Don't crash when background listing outlasts file manager list job · a0fd2014
      Milian Wolff authored
      When the QDir listing in the background thread takes a long time,
      e.g. by artificially introducing a sleep statement therein, then
      it can happen that the FileManagerListJob gets destroyed before
      the background task finishes. If that happens, then we used to
      access the dangling this pointer to access m_aborted or to invoke
      the handleResults method, both of which are undefined behavior.
      The latter usually crashes.
      Prevent this from happening by introducing a mutex that gets locked
      while we are running a background task and during destruction of
      the list job. This synchronizes the two tasks and prevents the
      crash from happening.
    • Milian Wolff's avatar
      Don't crash when project is closed before it was fully opened · 3aed7ac4
      Milian Wolff authored
      When we start loading a project and then directly remove its
      root folder, we would never get a projectOpened signal since
      we never fully populated the project. But we will see a projectClosing
      signal coming in, which would lead to a crash in the
      ProjectChangesModel, as we would not have created an item for that
      project yet. Prevent this crash by handling the scenario gracefully.
    • Script Kiddy's avatar
      GIT_SILENT made messages (after extraction) · 7753abec
      Script Kiddy authored
    • Script Kiddy's avatar
      GIT_SILENT made messages (after extraction) · 131ea36f
      Script Kiddy authored
  12. 11 Feb, 2019 3 commits
    • Aleix Pol Gonzalez's avatar
      Fix meson build · be86956d
      Aleix Pol Gonzalez authored
      CCMAIL: daniel@mensinger-ka.de
    • Aleix Pol Gonzalez's avatar
      Make sure we use the same compiler settings as the project is by default · 62ae1929
      Aleix Pol Gonzalez authored
      Instead of trusting the user to configure it beforehand, make it
      possible to check which compiler is being used in the build manager and
      uses it to figure out the initial compilation settings.
      This includes a QStringList IBSM::findCompiler(item) method to get the
      path to the used compiler. I wonder if we should be providing the
      sysroot as well.
      Test Plan:
      Been playing around with the androidqt branch that uses docker
      to implement the SDK instead of just expecting the user to install it himself.
      Reviewers: #kdevelop, mwolff
      Reviewed By: #kdevelop, mwolff
      Subscribers: mschwarz, aaronpuchert, mwolff, kdevelop-devel
      Differential Revision: https://phabricator.kde.org/D11136
    • René J.V. Bertin's avatar
      Don't call clear() on a shared pointer we don't own · fba39d4a
      René J.V. Bertin authored
      As per the documentation this will delete the pointer itself when the
      QSharedPointer refcount drops to 0 That can happen while the target
      QProcess instance is still running, and will happen occasionally (on
      Mac), causing a crash.
      The ChooseCMakeInterfaceJob instance will be deleted soon after a failed
      connection attempt so there is no need to clear the server pointer here.
      BUG: 403644
  13. 10 Feb, 2019 3 commits
    • Igor Kushnir's avatar
      Debugger plugin fixes · 02b042a9
      Igor Kushnir authored and Milian Wolff's avatar Milian Wolff committed
      Rename Qt logging category: common -> debuggercommon
      The old name was too generic and undescriptive. This resulted in
      the following confusing lines in KDevelop output:
        kdevelop.plugins.common: Change session  QObject(0x0)
        kdevelop.plugins.common: Will reparse arch
      MIDebugger: print a specific process error message
      Information in the messageboxes is general and sometimes insufficient
      to understand why the process could not be started. In such cases
      a warning-level error message can be useful. For example:
        Debugger ERRORED QProcess::FailedToStart "execvp: Exec format error"
        Debugger ERRORED QProcess::WriteError "Error writing to process"
      GdbDebugger: pass correct string in userCommandOutput()
      When Shell script was not empty, both the shell path and the debugger
      executable were duplicated in the string sent to userCommandOutput()
      because they are prepended to arguments in if(!shell.isEmpty()) branch.
      Test Plan:
      Run test_gdb, test_gdbprinters, test_lldb and test_lldbformatters.
      The number of failed and skipped tests did not change with these fixes.
      Reviewers: mwolff
      Reviewed By: mwolff
      Subscribers: mwolff, kdevelop-devel
      Tags: #kdevelop
      Differential Revision: https://phabricator.kde.org/D18325
    • Thomas Schöps's avatar
      Clang CodeCompletion: No auto-completion for numbers · e86c5a72
      Thomas Schöps authored and Milian Wolff's avatar Milian Wolff committed
      Summary: When typing a number, code-completion is undesirable in my opinion, since most likely no completion item applies and it only distracts, obstructs the view, or is triggered accidentally. Thus, this patch prevents code completion from automatically getting triggered for numbers. It does not cover all cases (code completion will still show something for floating-point numbers that start with a dot, such as .1f) but should cover the most common cases. Manual completion with Ctrl+Space is still possible.
      Test Plan: Tested manually.
      Reviewers: #kdevelop, mwolff
      Reviewed By: #kdevelop, mwolff
      Subscribers: mwolff, brauch, kdevelop-devel
      Tags: #kdevelop
      Differential Revision: https://phabricator.kde.org/D17915
    • Milian Wolff's avatar
      kdevelop-msvc.bat finds VS-2017 based on a registry key on Windows. · 7e4294a8
      Milian Wolff authored
      Some months earlier, we discussed [[ https://phabricator.kde.org/D15976 | here ]] about `kdevelop-msvc.bat` finding dynamically a VS2017 installation based on registry entries.
      Although it works on my Dell laptop (Windows 7 Ultimate x64), I haven't tested it anywhere else as I don't have access to another windows machine. So... any takers?
      Test Plan: In case some user has installed VS in a non-standard location (i.e. not in `C:\Program Files`), the script will be able to find the VS tools by not making the assumption that they are installed on `C:\`.
      Reviewers: #kdevelop, kfunk, brauch, mwolff
      Reviewed By: #kdevelop, mwolff
      Subscribers: mwolff, kdevelop-devel
      Tags: #kdevelop
      Differential Revision: https://phabricator.kde.org/D17908