]> Git trees. - libqmvoc.git/commitdiff
Fix new valueChanged() signals.
authorJason Harris <kstars@30doradus.org>
Sun, 30 Apr 2006 23:00:38 +0000 (23:00 +0000)
committerJason Harris <kstars@30doradus.org>
Sun, 30 Apr 2006 23:00:38 +0000 (23:00 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=536008

extdate/extdatetimeedit.cpp
extdate/extdatetimeedit.h

index 69e38c56272d9b5cc970439c41e6265d858ed945..b3444c135a078c95908b55232ff23f837206ab4c 100644 (file)
@@ -62,7 +62,7 @@ void ExtDateEdit::init( const ExtDate &d ) {
 
        //Make sure highlight is persistent when value is changed
        connect( this, SIGNAL( valueChanged( int ) ), this, SLOT( slotRefreshHighlight() ) );
-       connect( this, SIGNAL( valueChanged( int ) ), this, SIGNAL( valueChanged( date() ) ) );
+       connect( this, SIGNAL( valueChanged( int ) ), this, SLOT( slotEmitValueChanged() ) );
 
        edLineEdit *edle = new edLineEdit( this );
        setLineEdit(edle);
@@ -71,6 +71,10 @@ void ExtDateEdit::init( const ExtDate &d ) {
        highlightActiveField();
 }
 
+void ExtDateEdit::slotEmitValueChanged() {
+       emit valueChanged( date() );
+}
+
 QString ExtDateEdit::simpleDateFormat() {
        //Convert the KDE date format string (e.g., "%Y-%m-%d") to one 
        //that accurately represents the number of digits in each date 
@@ -236,8 +240,12 @@ void ExtDateTimeEdit::init( const ExtDateTime &dt ) {
        hlay->addWidget( m_DateEdit );
        hlay->addWidget( m_TimeEdit );
 
-       connect( m_DateEdit, SIGNAL( valueChanged( int ) ), this, SIGNAL( valueChanged( ExtDateTime( dateTime() ) ) ) );
-       connect( m_TimeEdit, SIGNAL( valueChanged( int ) ), this, SIGNAL( valueChanged( ExtDateTime( dateTime() ) ) ) );
+       connect( m_DateEdit, SIGNAL( valueChanged( int ) ), this, SLOT( slotEmitValueChanged() ) );
+       connect( m_TimeEdit, SIGNAL( valueChanged( int ) ), this, SLOT( slotEmitValueChanged() ) );
+}
+
+void ExtDateTimeEdit::slotEmitValueChanged() {
+       emit valueChanged( dateTime() );
 }
 
 edLineEdit::edLineEdit( QWidget *parent ) : QLineEdit( parent ) {
index cf209afe6e0fadde7b30f0c68adc8e41abcb3d23..d466e9d88de18cba67bbfc29cc2b3f5dddd501b4 100644 (file)
@@ -206,6 +206,8 @@ class ExtDateEdit : public QSpinBox {
        */
                void slotRefreshHighlight();
 
+               void slotEmitValueChanged();
+
        public:
 /**
        *@short Convert the KDE date format for internal use.
@@ -323,6 +325,9 @@ dt.time() ); }
        signals:
                void valueChanged( ExtDateTime dt );
 
+       private slots:
+               void slotEmitValueChanged();
+
        private:
        /**
         *@short Initialize the ExtDate edit.