- 18 Oct, 2020 3 commits
-
-
Igor Kushnir authored
-
Igor Kushnir authored
For each progress value report StatusBar::showProgress() calls ProgressItem::setUsesBusyIndicator(), which eventually results in a call to StatusbarProgressWidget::connectSingleItem(). The return value of ProgressManager::instance()->singleItem() changes very rarely between these calls. Let us avoid reconnecting the same signal/slot pair repeatedly.
-
Igor Kushnir authored
81220db1 eliminated such misleading progress reports for items that use a busy indicator themselves, but missed the case when a quick percent-progress-reporting task follows right after a busy-indicator task. For example, GrepJob's WorkCollectFiles step uses a busy indicator, then its next WorkGrep step reports progress in percents. So when the WorkGrep step is completed in less than a second (e.g. when there are not many files to search in and the looked-for string is not present in any of them), the bottom-right-corner progress bar shows a busy indicator for 5 seconds. Let us display 100% progress during these 5 seconds instead.
-
- 17 Oct, 2020 16 commits
-
-
Igor Kushnir authored
The fix was reverted in 5.6 because it broke the ABI. The ABI break is acceptable for the master branch => revert the reverting commit. This reverts commit 1a61900c.
-
Igor Kushnir authored
-
Milian Wolff authored
Don't use QTest::newRow(qstrdup(...)), use QTest::addRow("%s", ...) instead.
-
Milian Wolff authored
This was reported by LSAN in multiple tests.
-
Milian Wolff authored
Fixes UBSAN warning: ``` /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/debugger/variable/variablecollection.cpp:517:39: runtime error: downcast of address 0x6190002fe480 which does not point to an object of type 'View' 0x6190002fe480: note: object is of type 'QWidget' 16 02 00 7e a8 ea fb a2 36 7f 00 00 40 20 0a 00 40 61 00 00 58 ec fb a2 36 7f 00 00 00 00 be be ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QWidget' #0 0x7f36b128079f in KDevelop::VariableCollection::viewDestroyed(QObject*) /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/debugger/variable/variablecollection.cpp:517 ```
-
Milian Wolff authored
Fixes tons of leaks reported in test_projectcontroller.
-
Milian Wolff authored
We will have to do this everywhere, to prevent the vtable from potentially accidentally being inlined.
-
Milian Wolff authored
Use std::unique_ptr for factory functions.
-
Milian Wolff authored
Fixes UBSAN warnings in some tests which install a custom controller before initializing the core. E.g.: ``` ********* Start testing of TestProjectController ********* Config: Using QtTest library 5.15.1, Qt 5.15.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 10.2.0) /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/shell/core.cpp:336:15: runtime error: load of value 3200171710, which is not a valid value for type 'Setup' #0 0x7f3724cf4d43 in KDevelop::Core::setupFlags() const /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/shell/core.cpp:336 #1 0x7f3724c996c7 in KDevelop::PluginControllerPrivate::initKTextEditorIntegration() /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/shell/plugincontroller.cpp:297 #2 0x7f3724c4f759 in KDevelop::PluginController::PluginController(KDevelop::Core*) /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/shell/plugincontroller.cpp:357 #3 0x55fca7edb240 in FakePluginController::PluginController(KDevelop::Core*) /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/shell/tests/test_projectcontroller.cpp:140 #4 0x55fca7edb240 in TestProjectController::initTestCase() /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/shell/tests/test_projectcontroller.cpp:165 ```
-
Milian Wolff authored
Fixes various LSAN reports in ./bin/test_sessioncontroller.
-
Milian Wolff authored
-
Milian Wolff authored
Probably a real leak, but within the thirdparty library, so let's ignore this for now.
-
Igor Kushnir authored
This fix broke the ABI, kdev-python no longer compiles. Therefore it must be reverted in the stable 5.6 branch. This reverts commit 37ff587e.
-
Milian Wolff authored
-
Milian Wolff authored
Most notably, get rid of the `*_autogen_timestamp_deps` target and ignore generated target source files in the `CMakeFiles` folder. Furthermore skip the `*_autogen/timestamp` files, they aren't interesting to us either.
-
Signed-off-by:
Juraj Oravec <sgd.orava@gmail.com>
-
- 16 Oct, 2020 7 commits
-
-
Igor Kushnir authored
Efficient moving of ProjectFile is important for ProjectFileDataProvider's performance. GIT_SILENT
-
Igor Kushnir authored
The user-declared copy constructors and copy assignment operators prevented compiler from generating noexcept move constructors and move assignment operators for these two class templates. Eliminating the declarations of copy operations to follow the rule of zero is impossible or at least confusing, because of other constructors and assignment operators in the two class templates. Let us default the move operations instead to improve performance. DUChainPointer(const DUChainPointer& rhs) was not defaulted, but did exactly what the defaulted copy constructor would do as d is the only DUChainPointer's data member. Let us make this more obvious by defaulting this copy constructor.
-
Igor Kushnir authored
The pseudo-copy constructor, the defaulted copy assignment operator and destructor prevented compiler from generating noexcept move constructor and move assignment operator. Eliminating them follows the rule of zero and lets the compiler generate efficient default operations. Path(const Path& base, const QString& subPath = QString()) acts as an inefficient copy constructor. When only one Path argument is passed to this constructor, the only effect is in the member initializer list: `: m_data(other.m_data)`. This is exactly what the defaulted copy constructor would do as m_data is the only Path's data member. But the compiler-generated copy constructor is faster, because it is inline and it doesn't perform various checks on subPath. This should improve performance in many places. For example, it makes ProjectFileDataProvider::projectOpened() and ProjectFileDataProvider::projectClosing() somewhat faster.
-
Igor Kushnir authored
-
Igor Kushnir authored
GIT_SILENT
-
Igor Kushnir authored
300ea014 introduced DocumentControllerPrivate::shuttingDown variable. It is set to false in constructor and to true in DocumentController::cleanup(). However TestDocumentController::init() calls DocumentController::initialize() before each test function; TestDocumentController::cleanup() calls DocumentController::cleanup() after each test function. So the second test function fails to open a document after shutdown. Let us set DocumentControllerPrivate::shuttingDown to false in DocumentController::initialize() to fix the test failure.
-
Igor Kushnir authored
-
- 15 Oct, 2020 14 commits
-
-
Milian Wolff authored
Use std::unique_ptr to prevent the leaks.
-
Milian Wolff authored
Fix the (broken) usage of operator++ in test_kdevhash to make it compile. Just flip/flop between the values instead.
-
Friedrich W. H. Kossebau authored
GIT_:SILENT
-
Friedrich W. H. Kossebau authored
GIT_SILENT
-
Friedrich W. H. Kossebau authored
GIT_SILENT
-
Milian Wolff authored
Do not expect QtQuick 1.0 by default, that's long deprecated. Furthermore, improve the module code completion by listing all library paths.
-
Milian Wolff authored
Don't rely on `next` bringing us to the expected line. Instead, request the line explicitly and continue until we land there. Apparrently some compiler change triggered a failure of the test then otherwise, as we ended up in the A::A ctor in line 11 while we actually wanted to print the pointerList in loc 46.
-
Milian Wolff authored
Fixes UBSAN warning: ``` /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/sublime/document.cpp:73:70: runtime error: downcast of address 0x6030000bcd40 which does not point to an object of type 'Document' 0x6030000bcd40: note: object is of type 'QObject' 24 00 00 18 e0 a4 64 8d 8a 7f 00 00 a0 52 03 00 80 60 00 00 d0 5b 09 00 40 60 00 00 d0 d1 00 00 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QObject' #0 0x7f8a8f5e99d5 in operator() /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/sublime/document.cpp:73 #1 0x7f8a8f5e99d5 in call /usr/include/qt/QtCore/qobjectdefs_impl.h:146 #2 0x7f8a8f5e99d5 in call<QtPrivate::List<QObject*>, void> /usr/include/qt/QtCore/qobjectdefs_impl.h:256 #3 0x7f8a8f5e99d5 in impl /usr/include/qt/QtCore/qobjectdefs_impl.h:443 #4 0x7f8a8d3eb035 (/usr/lib/libQt5Core.so.5+0x2eb035) #5 0x7f8a8d3e427f in QObject::destroyed(QObject*) (/usr/lib/libQt5Core.so.5+0x2e427f) #6 0x7f8a8d3e9356 in QObject::~QObject() (/usr/lib/libQt5Core.so.5+0x2e9356) #7 0x7f8a8f5ebf91 in Sublime::Document::~Document() /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/sublime/document.cpp:76 ```
-
Milian Wolff authored
Fixes UBSAN warning: ``` /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/sublime/document.cpp:91:72: runtime error: downcast of address 0x60300038b6f0 which does not point to an object of type 'View' 0x60300038b6f0: note: object is of type 'QObject' 22 00 80 03 e0 c4 ad 14 57 7f 00 00 a0 fa 1a 00 80 60 00 00 50 b7 38 00 30 60 00 00 00 00 00 00 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QObject' #0 0x7f5716a8026e in operator() /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/sublime/document.cpp:91 #1 0x7f5716a8026e in call /usr/include/qt/QtCore/qobjectdefs_impl.h:146 #2 0x7f5716a8026e in call<QtPrivate::List<QObject*>, void> /usr/include/qt/QtCore/qobjectdefs_impl.h:256 #3 0x7f5716a8026e in impl /usr/include/qt/QtCore/qobjectdefs_impl.h:443 #4 0x7f571487d035 (/usr/lib/libQt5Core.so.5+0x2eb035) #5 0x7f571487627f in QObject::destroyed(QObject*) (/usr/lib/libQt5Core.so.5+0x2e427f) #6 0x7f571487b356 in QObject::~QObject() (/usr/lib/libQt5Core.so.5+0x2e9356) #7 0x7f5716b351b2 in Sublime::View::~View() /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/sublime/view.cpp:60 ```
-
Milian Wolff authored
Fixes UBSAN report: ``` /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/sublime/area.cpp:158:66: runtime error: downcast of address 0x6030000bd7f0 which does not point to an object of type 'Area' 0x6030000bd7f0: note: object is of type 'QObject' 2f 00 00 7b e0 a4 1c 83 62 7f 00 00 20 59 03 00 80 60 00 00 00 df 00 00 b0 60 00 00 00 00 00 00 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QObject' #0 0x7f628507ca99 in operator() /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/sublime/area.cpp:158 #1 0x7f628507ca99 in call /usr/include/qt/QtCore/qobjectdefs_impl.h:146 #2 0x7f628507ca99 in call<QtPrivate::List<QObject*>, void> /usr/include/qt/QtCore/qobjectdefs_impl.h:256 #3 0x7f628507ca99 in impl /usr/include/qt/QtCore/qobjectdefs_impl.h:443 #4 0x7f6282f6b035 (/usr/lib/libQt5Core.so.5+0x2eb035) #5 0x7f6282f6427f in QObject::destroyed(QObject*) (/usr/lib/libQt5Core.so.5+0x2e427f) #6 0x7f6282f69356 in QObject::~QObject() (/usr/lib/libQt5Core.so.5+0x2e9356) #7 0x7f6285096fcb in Sublime::Area::~Area() /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/sublime/area.cpp:161 #8 0x7f628509815e in Sublime::Area::~Area() /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/sublime/area.cpp:161 #9 0x56049f3ba6c5 in TestAreaOperation::cleanup() /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/sublime/tests/test_areaoperation.cpp:144 ```
-
Milian Wolff authored
Free the raw string we get when we call QTest::toString on the KTextEditor::Range internally. Fixes LSAN warning: ``` Direct leak of 76 byte(s) in 4 object(s) allocated from: #0 0x7f1cde10b0c1 in operator new[](unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:102 #1 0x7f1cc5d2d518 in qstrdup(char const*) (/usr/lib/libQt5Core.so.5+0x124518) #2 0x7f1cc7eace1d in char* QTest::toString<KTextEditor::Range>(KTextEditor::Range const&) /home/milian/projects/kf5/src/frameworks/ktexteditor/src/utils/range.cpp:105 #3 0x559204f76e07 in char* QTest::toString<KDevelop::DocumentRange>(KDevelop::DocumentRange const&) /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/language/editor/documentrange.h:66 ``` While at it, use QByteArray::fromRawData too.
-
Milian Wolff authored
Fixes UBSAN warning: ``` QWARN : TestProblems::cleanupTestCase() 1.561 ?[31mwarning: KDevelop::EmbeddedTreeRemoveItem::newItemCount[/home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/util/embeddedfreetree.h:814]?[0m: 77 VS 32 /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/util/embeddedfreetree.h:816:17: runtime error: shift exponent 32 is too large for 32-bit type 'unsigned int' ```
-
Milian Wolff authored
Use QCoreApplication instead
-
Milian Wolff authored
Without this setting, one cannot use a clang-format pre-commit hook, as it would frequently pull in unrelated changes. We should fix the sorting once in the whole code base and then re-enable this setting eventually.
-