diff --git a/stringutil.h b/stringutil.h index 2aad08c75..6b10e9355 100644 --- a/stringutil.h +++ b/stringutil.h @@ -158,4 +158,4 @@ namespace StringUtil } -#endif \ No newline at end of file +#endif diff --git a/templatesconfiguration_kfg.kcfg b/templatesconfiguration_kfg.kcfg index 9cee9e497..b7dc8ea33 100644 --- a/templatesconfiguration_kfg.kcfg +++ b/templatesconfiguration_kfg.kcfg @@ -9,6 +9,7 @@ + false diff --git a/templatesinsertcommand.cpp b/templatesinsertcommand.cpp index 60f38e97c..efdcff9ed 100644 --- a/templatesinsertcommand.cpp +++ b/templatesinsertcommand.cpp @@ -33,9 +33,7 @@ TemplatesInsertCommand::TemplatesInsertCommand( QWidget *parent, const char *nam : QPushButton( parent ) { setObjectName( name ); - setText( i18n( "&Insert Command..." ) ); - connect( this, SIGNAL( clicked() ), - this, SLOT( slotClicked() ) ); + setText( i18n( "&Insert Command" ) ); KAction *action; KActionMenu *menu; @@ -44,7 +42,7 @@ TemplatesInsertCommand::TemplatesInsertCommand( QWidget *parent, const char *nam connect( mapper, SIGNAL( mapped(int) ), this, SLOT( slotMapped(int) ) ); - mMenu = new KActionMenu( i18n( "Insert Command..." ), this ); + mMenu = new KActionMenu( i18n( "Insert Command" ), this ); // ****************************************************** menu = new KActionMenu( i18n( "Original Message" ), mMenu ); @@ -371,16 +369,12 @@ TemplatesInsertCommand::TemplatesInsertCommand( QWidget *parent, const char *nam connect(action,SIGNAL(triggered(bool)),mapper,SLOT(map())); mapper->setMapping( action, CDebugOff ); menu->addAction( action ); -} -TemplatesInsertCommand::~TemplatesInsertCommand() -{ + setMenu( mMenu->menu() ); } -void TemplatesInsertCommand::slotClicked() +TemplatesInsertCommand::~TemplatesInsertCommand() { - QSize ps = mMenu->menu()->sizeHint(); - mMenu->menu()->popup( mapToGlobal( QPoint( 0, -(ps.height()) ) ) ); } void TemplatesInsertCommand::slotMapped( int cmd ) diff --git a/templatesinsertcommand.h b/templatesinsertcommand.h index 60e4381e9..867762319 100644 --- a/templatesinsertcommand.h +++ b/templatesinsertcommand.h @@ -50,7 +50,6 @@ class TemplatesInsertCommand : public QPushButton void insertCommand( const QString& cmd, int adjustCursor = 0 ); public slots: - void slotClicked(); void slotMapped( int cmd ); protected: