author | alwin <alwin> | 2004-03-02 13:25:49 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-02 13:25:49 (UTC) |
commit | ac3e7c0a1ccbb984f06917ebe6156b1681b7de7f (patch) (side-by-side diff) | |
tree | dbfc670acbb2bee8032c1fa34b45948cf3b9631b /libopie2 | |
parent | b6b1c97559c0ed9f2e33632272426bf98f289232 (diff) | |
download | opie-ac3e7c0a1ccbb984f06917ebe6156b1681b7de7f.zip opie-ac3e7c0a1ccbb984f06917ebe6156b1681b7de7f.tar.gz opie-ac3e7c0a1ccbb984f06917ebe6156b1681b7de7f.tar.bz2 |
applied changes from optimize_connect script
-rw-r--r-- | libopie2/qt3/opieui/ocombobox.cpp | 20 | ||||
-rw-r--r-- | libopie2/qt3/opieui/ocompletionbox.cpp | 10 | ||||
-rw-r--r-- | libopie2/qt3/opieui/ojanuswidget.cpp | 10 | ||||
-rw-r--r-- | libopie2/qt3/opieui/olineedit.cpp | 24 |
4 files changed, 32 insertions, 32 deletions
diff --git a/libopie2/qt3/opieui/ocombobox.cpp b/libopie2/qt3/opieui/ocombobox.cpp index 8dbda8f..bd330e0 100644 --- a/libopie2/qt3/opieui/ocombobox.cpp +++ b/libopie2/qt3/opieui/ocombobox.cpp @@ -319,38 +319,38 @@ void OComboBox::create( WId id, bool initializeWindow, bool destroyOldWindow ) void OComboBox::setLineEdit( OLineEdit *edit ) { #if QT_VERSION > 290 QComboBox::setLineEdit( edit ); if ( !edit->inherits( "OLineEdit" ) ) d->olineEdit = 0; else d->olineEdit = static_cast<OLineEdit*>( edit ); setDelegate( d->olineEdit ); // forward some signals. We only emit returnPressed() ourselves. if ( d->olineEdit ) { - connect( d->olineEdit, SIGNAL( completion( const QString& )), - SIGNAL( completion( const QString& )) ); - connect( d->olineEdit, SIGNAL( substringCompletion( const QString& )), - SIGNAL( substringCompletion( const QString& )) ); + connect( d->olineEdit, SIGNAL( completion(const QString&)), + SIGNAL( completion(const QString&)) ); + connect( d->olineEdit, SIGNAL( substringCompletion(const QString&)), + SIGNAL( substringCompletion(const QString&)) ); connect( d->olineEdit, - SIGNAL( textRotation( OCompletionBase::KeyBindingType )), - SIGNAL( textRotation( OCompletionBase::KeyBindingType )) ); + SIGNAL( textRotation(OCompletionBase::KeyBindingType)), + SIGNAL( textRotation(OCompletionBase::KeyBindingType)) ); connect( d->olineEdit, - SIGNAL( completionModeChanged( OGlobalSettings::Completion )), - SIGNAL( completionModeChanged( OGlobalSettings::Completion))); + SIGNAL( completionModeChanged(OGlobalSettings::Completion)), + SIGNAL( completionModeChanged(OGlobalSettings::Completion))); connect( d->olineEdit, - SIGNAL( aboutToShowContextMenu( QPopupMenu * )), - SIGNAL( aboutToShowContextMenu( QPopupMenu * )) ); + SIGNAL( aboutToShowContextMenu(QPopupMenu*)), + SIGNAL( aboutToShowContextMenu(QPopupMenu*)) ); } #else #warning OComboBox is not fully functional with Qt2 #endif } // Temporary functions until QT3 appears. - Seth Chaiklin 20 may 2001 void OComboBox::deleteWordForward() { lineEdit()->cursorWordForward(TRUE); #if QT_VERSION > 290 if ( lineEdit()->hasSelectedText() ) diff --git a/libopie2/qt3/opieui/ocompletionbox.cpp b/libopie2/qt3/opieui/ocompletionbox.cpp index b594b8e..b36123e 100644 --- a/libopie2/qt3/opieui/ocompletionbox.cpp +++ b/libopie2/qt3/opieui/ocompletionbox.cpp @@ -58,32 +58,32 @@ OCompletionBox::OCompletionBox( QWidget *parent, const char *name ) setColumnMode( 1 ); setLineWidth( 1 ); setFrameStyle( QFrame::Box | QFrame::Plain ); if ( parent ) setFocusProxy( parent ); else setFocusPolicy( NoFocus ); setVScrollBarMode( Auto ); setHScrollBarMode( AlwaysOff ); - connect( this, SIGNAL( doubleClicked( QListBoxItem * )), - SLOT( slotActivated( QListBoxItem * )) ); + connect( this, SIGNAL( doubleClicked(QListBoxItem*)), + SLOT( slotActivated(QListBoxItem*)) ); // grmbl, just QListBox workarounds :[ Thanks Volker. - connect( this, SIGNAL( currentChanged( QListBoxItem * )), + connect( this, SIGNAL( currentChanged(QListBoxItem*)), SLOT( slotCurrentChanged() )); - connect( this, SIGNAL( clicked( QListBoxItem * )), - SLOT( slotItemClicked( QListBoxItem * )) ); + connect( this, SIGNAL( clicked(QListBoxItem*)), + SLOT( slotItemClicked(QListBoxItem*)) ); } OCompletionBox::~OCompletionBox() { d->m_parent = 0L; delete d; } QStringList OCompletionBox::items() const { QStringList list; for ( uint i = 0; i < count(); i++ ) { diff --git a/libopie2/qt3/opieui/ojanuswidget.cpp b/libopie2/qt3/opieui/ojanuswidget.cpp index 0a037ff..063e393 100644 --- a/libopie2/qt3/opieui/ojanuswidget.cpp +++ b/libopie2/qt3/opieui/ojanuswidget.cpp @@ -100,25 +100,25 @@ OJanusWidget::OJanusWidget( QWidget *parent, const char *name, int face ) if( mFace == TreeList ) { QSplitter *splitter = new QSplitter( this ); topLayout->addWidget( splitter, 10 ); mTreeListResizeMode = QSplitter::KeepSize; mTreeList = new QListView( splitter ); mTreeList->addColumn( QString::fromLatin1("") ); mTreeList->header()->hide(); mTreeList->setRootIsDecorated(true); mTreeList->setSorting( -1 ); connect( mTreeList, SIGNAL(selectionChanged()), SLOT(slotShowPage()) ); - connect( mTreeList, SIGNAL(clicked(QListViewItem *)), SLOT(slotItemClicked(QListViewItem *))); + connect( mTreeList, SIGNAL(clicked(QListViewItem*)), SLOT(slotItemClicked(QListViewItem*))); // // Page area. Title at top with a separator below and a pagestack using // all available space at bottom. // QFrame *p = new QFrame( splitter ); QHBoxLayout *hbox = new QHBoxLayout( p, 0, 0 ); hbox->addSpacing( ODialog::spacingHint() ); page = new QFrame( p ); hbox->addWidget( page, 10 ); @@ -150,26 +150,26 @@ OJanusWidget::OJanusWidget( QWidget *parent, const char *name, int face ) mTitleLabel = new QLabel( QString::fromLatin1("Empty page"), page, "OJanusWidgetTitleLabel" ); vbox->addWidget( mTitleLabel ); QFont titleFont( mTitleLabel->font() ); titleFont.setBold( true ); mTitleLabel->setFont( titleFont ); mTitleSep = new OSeparator( page ); mTitleSep->setFrameStyle( QFrame::HLine|QFrame::Plain ); vbox->addWidget( mTitleSep ); mPageStack = new QWidgetStack( page ); - connect(mPageStack, SIGNAL(aboutToShow(QWidget *)), - this, SIGNAL(aboutToShowPage(QWidget *))); + connect(mPageStack, SIGNAL(aboutToShow(QWidget*)), + this, SIGNAL(aboutToShowPage(QWidget*))); vbox->addWidget( mPageStack, 10 ); } else if( mFace == Tabbed ) { mPageList = new QPtrList<QWidget>; mTabControl = new QTabWidget( this ); mTabControl->setMargin (ODialog::marginHint()); topLayout->addWidget( mTabControl, 10 ); } else if( mFace == Swallow ) { @@ -854,27 +854,27 @@ void OJanusWidget::setShowIconsInTreeList( bool state ) void OJanusWidget::setRootIsDecorated( bool state ) { if( mFace == TreeList ) { mTreeList->setRootIsDecorated(state); } } void OJanusWidget::unfoldTreeList( bool persist ) { if( mFace == TreeList ) { if( persist ) - connect( mTreeList, SIGNAL( collapsed( QListViewItem * ) ), this, SLOT( slotReopen( QListViewItem * ) ) ); + connect( mTreeList, SIGNAL( collapsed(QListViewItem*) ), this, SLOT( slotReopen(QListViewItem*) ) ); else - disconnect( mTreeList, SIGNAL( collapsed( QListViewItem * ) ), this, SLOT( slotReopen( QListViewItem * ) ) ); + disconnect( mTreeList, SIGNAL( collapsed(QListViewItem*) ), this, SLOT( slotReopen(QListViewItem*) ) ); for( QListViewItem * item = mTreeList->firstChild(); item; item = item->itemBelow() ) item->setOpen( true ); } } void OJanusWidget::showEvent( QShowEvent * ) { if( mFace == TreeList ) { QSplitter *splitter = (QSplitter*)(mTreeList->parentWidget()); splitter->setResizeMode( mTreeList, mTreeListResizeMode ); diff --git a/libopie2/qt3/opieui/olineedit.cpp b/libopie2/qt3/opieui/olineedit.cpp index 9cb0cff..6f66fc7 100644 --- a/libopie2/qt3/opieui/olineedit.cpp +++ b/libopie2/qt3/opieui/olineedit.cpp @@ -438,26 +438,26 @@ QPopupMenu *OLineEdit::createPopupMenu() #if QT_VERSION > 290 QPopupMenu *popup = QLineEdit::createPopupMenu(); #else QPopupMenu *popup = new QPopupMenu(); #warning OLineEdit is not fully functional on Qt2 #endif // completion object is present. if ( compObj() ) { QPopupMenu *subMenu = new QPopupMenu( popup ); - connect( subMenu, SIGNAL( activated( int ) ), - this, SLOT( completionMenuActivated( int ) ) ); + connect( subMenu, SIGNAL( activated(int) ), + this, SLOT( completionMenuActivated(int) ) ); popup->insertSeparator(); //popup->insertItem( SmallIconSet("completion"), i18n("Text Completion"), // subMenu ); popup->insertItem( tr("Text Completion"), subMenu ); subMenu->insertItem( tr("None"), NoCompletion ); subMenu->insertItem( tr("Manual"), ShellCompletion ); subMenu->insertItem( tr("Automatic"), AutoCompletion ); subMenu->insertItem( tr("Dropdown List"), PopupCompletion ); subMenu->insertItem( tr("Short Automatic"), SemiAutoCompletion ); @@ -607,35 +607,35 @@ bool OLineEdit::trapReturnKey() const { QLineEdit::setText( url.prettyURL() ); }*/ void OLineEdit::makeCompletionBox() { if ( d->completionBox ) return; d->completionBox = new OCompletionBox( this, "completion box" ); if ( handleSignals() ) { - connect( d->completionBox, SIGNAL(highlighted( const QString& )), - SLOT(setText( const QString& )) ); - connect( d->completionBox, SIGNAL(userCancelled( const QString& )), - SLOT(setText( const QString& )) ); + connect( d->completionBox, SIGNAL(highlighted(const QString&)), + SLOT(setText(const QString&)) ); + connect( d->completionBox, SIGNAL(userCancelled(const QString&)), + SLOT(setText(const QString&)) ); // Nice lil' hacklet ;) KComboBox doesn't know when the completionbox // is created (childEvent() is even more hacky, IMHO), so we simply // forward the completionbox' activated signal from here. if ( parentWidget() && parentWidget()->inherits("KComboBox") ) - connect( d->completionBox, SIGNAL( activated( const QString& )), - parentWidget(), SIGNAL( activated( const QString & ))); + connect( d->completionBox, SIGNAL( activated(const QString&)), + parentWidget(), SIGNAL( activated(const QString&))); } } /*bool OLineEdit::overrideAccel (const QKeyEvent* e) { KShortcut scKey; KKey key( e ); KeyBindingMap keys = getKeyBindings(); if (keys[TextCompletion].isNull()) scKey = KStdAccel::shortcut(KStdAccel::TextCompletion); @@ -697,30 +697,30 @@ void OLineEdit::setCompletedItems( const QStringList& items ) OCompletionBox * OLineEdit::completionBox( bool create ) { if ( create ) makeCompletionBox(); return d->completionBox; } void OLineEdit::setCompletionObject( OCompletion* comp, bool hsig ) { OCompletion *oldComp = compObj(); if ( oldComp && handleSignals() ) - disconnect( oldComp, SIGNAL( matches( const QStringList& )), - this, SLOT( setCompletedItems( const QStringList& ))); + disconnect( oldComp, SIGNAL( matches(const QStringList&)), + this, SLOT( setCompletedItems(const QStringList&))); if ( comp && hsig ) - connect( comp, SIGNAL( matches( const QStringList& )), - this, SLOT( setCompletedItems( const QStringList& ))); + connect( comp, SIGNAL( matches(const QStringList&)), + this, SLOT( setCompletedItems(const QStringList&))); OCompletionBase::setCompletionObject( comp, hsig ); } // QWidget::create() turns off mouse-Tracking which would break auto-hiding void OLineEdit::create( WId id, bool initializeWindow, bool destroyOldWindow ) { QLineEdit::create( id, initializeWindow, destroyOldWindow ); //OCursor::setAutoHideCursor( this, true, true ); } void OLineEdit::clear() |