[rkward-cvs] SF.net SVN: rkward:[3690] trunk/rkward/rkward/windows/rkcommandeditorwindow .cpp
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Tue Jun 14 17:59:54 UTC 2011
Revision: 3690
http://rkward.svn.sourceforge.net/rkward/?rev=3690&view=rev
Author: tfry
Date: 2011-06-14 17:59:53 +0000 (Tue, 14 Jun 2011)
Log Message:
-----------
Don't try tryCompletion(), if not using R highlighting. Fixes some asserts.
Modified Paths:
--------------
trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp
Modified: trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp 2011-06-14 17:47:06 UTC (rev 3689)
+++ trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp 2011-06-14 17:59:53 UTC (rev 3690)
@@ -116,14 +116,10 @@
connect (m_doc, SIGNAL (documentUrlChanged (KTextEditor::Document*)), this, SLOT (updateCaption (KTextEditor::Document*)));
connect (m_doc, SIGNAL (modifiedChanged (KTextEditor::Document*)), this, SLOT (updateCaption(KTextEditor::Document*))); // of course most of the time this causes a redundant call to updateCaption. Not if a modification is undone, however.
connect (m_doc, SIGNAL (modifiedChanged (KTextEditor::Document*)), this, SLOT (autoSaveHandlerModifiedChanged()));
- connect (m_doc, SIGNAL (textChanged (KTextEditor::Document*)), this, SLOT (tryCompletionProxy (KTextEditor::Document*)));
connect (m_doc, SIGNAL (textChanged (KTextEditor::Document*)), this, SLOT (autoSaveHandlerTextChanged()));
connect (m_view, SIGNAL (selectionChanged(KTextEditor::View*)), this, SLOT (selectionChanged(KTextEditor::View*)));
// somehow the katepart loses the context menu each time it loses focus
connect (m_view, SIGNAL (focusIn(KTextEditor::View*)), this, SLOT (focusIn(KTextEditor::View*)));
- completion_timer = new QTimer (this);
- completion_timer->setSingleShot (true);
- connect (completion_timer, SIGNAL (timeout ()), this, SLOT (tryCompletion()));
completion_model = 0;
cc_iface = 0;
@@ -134,6 +130,10 @@
if (cc_iface) {
cc_iface->setAutomaticInvocationEnabled (true);
completion_model = new RKCodeCompletionModel (this);
+ completion_timer = new QTimer (this);
+ completion_timer->setSingleShot (true);
+ connect (completion_timer, SIGNAL (timeout ()), this, SLOT (tryCompletion()));
+ connect (m_doc, SIGNAL (textChanged (KTextEditor::Document*)), this, SLOT (tryCompletionProxy (KTextEditor::Document*)));
} else {
RK_ASSERT (false);
}
@@ -509,7 +509,7 @@
if (RKSettingsModuleCommandEditor::completionEnabled ()) {
if (cc_iface && cc_iface->isCompletionActive ()) {
tryCompletion ();
- } else {
+ } else if (cc_iface) {
completion_timer->start (RKSettingsModuleCommandEditor::completionTimeout ());
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list