Summary: | Pressing Ctrl-S at the CMake dialog when creating class crashes KDevelop | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Esben Mose Hansen <kde> |
Component: | Build tools: CMake | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | aleixpol, MacJariel, olivier.jg, xzekecomax |
Priority: | HI | ||
Version: | unspecified | ||
Target Milestone: | 4.0.0 | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Esben Mose Hansen
2009-08-11 14:37:36 UTC
I can reproduce this here: #0 0xf72c5466 in QByteArray::isEmpty (this=0xa9b1840) at ../../include/QtCore/../../../../kde-qt/src/corelib/tools/qbytearray.h:396 #1 0xf6cb374b in QUrlPrivate::parse (this=0xa9b1820, parseOptions=QUrlPrivate::ParseAndSet) at /home/andreas/src/kde-qt/src/corelib/io/qurl.cpp:3584 #2 0xf6cb53ad in QUrl::scheme (this=0xa3e2b3c) at /home/andreas/src/kde-qt/src/corelib/io/qurl.cpp:4182 #3 0xf7dfda5c in KUrl::hasSubUrl (this=0xa3e2b3c) at /home/andreas/src/kdelibs/kdecore/io/kurl.cpp:938 #4 0xf7dfebbe in KUrl::fileName (this=0xa3e2b3c, options=...) at /home/andreas/src/kdelibs/kdecore/io/kurl.cpp:1223 #5 0xeea179b2 in CMakeManager::addFileToTarget (this=0x8bbdfb8, it=0xc4f9388, target=0xa2a7b80) at /home/andreas/src/kdevelop/projectmanagers/cmake/cmakemanager.cpp:1076 #6 0xe806ea58 in SimpleRefactoring::createNewClass (this=0xe808f5d0, item=0xa2a7b80) at /home/andreas/src/kdevelop/languages/cpp/codegen/simplerefactoring.cpp:247 #7 0xe806eb48 in SimpleRefactoring::executeNewClassAction (this=0xe808f5d0) at /home/andreas/src/kdevelop/languages/cpp/codegen/simplerefactoring.cpp:164 Actually here what we should do is to disable the KPart actions on the applychangeswidget. I'll give a deeper look at some point. That Create Class action is broken here for me anyway :S. *** Bug 207531 has been marked as a duplicate of this bug. *** Has this CMake dialog been removed? I don't see it... (CMake project, using menu "Code>Create New Class"). If it has, presumably this bug can be closed. (In reply to comment #4) > Has this CMake dialog been removed? I don't see it... (CMake project, using > menu "Code>Create New Class"). If it has, presumably this bug can be closed. No, its still there. However its apparently not always shown and I don't know the exact semantics. It should be shown if you use the project tree, right-click onto a target and select "add class" there. It's shown also when you remove file/subdirectory or add subdirectory. Just tested and works fine for me. Except for the Ctrl+S thing that I don't know how to disable, i tried: actionCollection()->action("file_save")->setEnabled(false) but didn't work. I guess another solution would be to accept when ctrl+s is pressed. (In reply to comment #6) > Just tested and works fine for me. Except for the Ctrl+S thing that I don't > know how to disable, i tried: > actionCollection()->action("file_save")->setEnabled(false) but didn't work. > > I guess another solution would be to accept when ctrl+s is pressed. So you're embedding katepart I guess? Are you doing that via the partmanager? To avoid having those shortcuts available, you simply need to make sure that no xmlgui merging is done. Either that or instead of a standalone dialog combine this with the patchreview plugin... http://websvn.kde.org/trunk/KDE/kdevplatform/language/codegen/applychangeswidget.cpp?revision=1017523&view=markup line 212. Probably we'd better use the PartController for that, indeed. Yes, it's embeddign a kate part (or anything the mimetype trader offers). It turns out that using IPartController::createPart causes an endless loop with this message: QMetaObject::indexOfSignal:KateDocument: Conflict with KTextEditor::Document::highlightingModeChanged(KTextEditor::Document*) QMetaObject::indexOfSignal:KateViewEncodingAction: Conflict with KSelectAction::triggered(QString) Seems like a problem inside kate. Now to the actual problem, it only exists when hitting Ctrl+S and then Ok directly afterwards, so KDevelop is not yet done re-reading the changes saved via Ctrl+S. I tried to find the actions, but somehow I can't find the Kate-actions. One thing I noticed: It expects KTE, but doesn't enforce KTE. So maybe we can workaround/fix this by using the example from the KTE docs that show how to use KEditorChooser to create a KTE document and view. *** Bug 217503 has been marked as a duplicate of this bug. *** SVN commit 1059611 by apol: Prevent the user to save the file in the applychangeswidget, it should be changed programatically (when ok is clicked). BUG: 203428 M +10 -1 applychangeswidget.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1059611 |