[kdevplatform] plugins/snippet: Revert "show explanation on failed snippet name validation"

Andreas Pakulat apaku at gmx.de
Thu Feb 16 19:54:21 UTC 2012


Git commit bad517e9f2f1e3cf032bea0eab8fe36fd4314026 by Andreas Pakulat.
Committed on 16/02/2012 at 20:52.
Pushed by apaku into branch 'master'.

Revert "show explanation on failed snippet name validation"

This reverts commit a414f42a9d1f2b08fcd08d8c39a7759657eeb684.

The code uses a KDE 4.7 class (kmessagewidget.h) and hence kdevplatform
fails to build on KDE 4.6 and older. Since KDevPlatform is supposed to
build against KDE 4.5 a solution without that widget needs to be found.

CCMAIL: kdevelop-devel at kdevelop.org
CCMAIL: gmary at lunacymaze.org

M  +0    -7    plugins/snippet/editsnippet.cpp
M  +0    -13   plugins/snippet/editsnippet.ui

http://commits.kde.org/kdevplatform/bad517e9f2f1e3cf032bea0eab8fe36fd4314026

diff --git a/plugins/snippet/editsnippet.cpp b/plugins/snippet/editsnippet.cpp
index c38cfc6..732c52a 100644
--- a/plugins/snippet/editsnippet.cpp
+++ b/plugins/snippet/editsnippet.cpp
@@ -25,7 +25,6 @@
 #include <KTextEditor/View>
 #include <KToolInvocation>
 #include <KMessageBox>
-#include <KMessageWidget>
 
 #include "snippetstore.h"
 #include "snippet.h"
@@ -145,15 +144,9 @@ void EditSnippet::validate()
         for ( int i = 0; i < name.length(); ++i ) {
             if ( name.at(i).isSpace() ) {
                 valid = false;
-                m_ui->messageWidget->setText(i18n("Snippet name must not contain spaces"));
-                m_ui->messageWidget->animatedShow();
                 break;
             }
         }
-        if (valid) {
-            // hide message widget if snippet does not include spaces
-            m_ui->messageWidget->animatedHide();
-        }
     }
     button(Ok)->setEnabled(valid);
     button(Apply)->setEnabled(valid);
diff --git a/plugins/snippet/editsnippet.ui b/plugins/snippet/editsnippet.ui
index 4716f57..bb48e5e 100644
--- a/plugins/snippet/editsnippet.ui
+++ b/plugins/snippet/editsnippet.ui
@@ -18,19 +18,6 @@
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
    <item>
-     <widget class="KMessageWidget" name="messageWidget">
-       <property name="visible">
-         <bool>false</bool>
-       </property>
-       <property name="closeButtonVisible">
-         <bool>false</bool>
-       </property>
-       <property name="messageType">
-           <enum>KMessageWidget::Warning</enum>
-       </property>
-     </widget>
-   </item>
-   <item>
     <layout class="QFormLayout" name="formLayout">
      <property name="fieldGrowthPolicy">
       <enum>QFormLayout::ExpandingFieldsGrow</enum>




More information about the KDevelop-devel mailing list