Hi,

Would someone mind reviewing the attached diff?  It reduces use of
deprecated code in a few spots.  There still may be some lingering around,
these were just some of the obvious ones.

Thanks,
Dave
Index: kopete/contactlist/kopetecontactlistview.cpp
===================================================================
--- kopete/contactlist/kopetecontactlistview.cpp        (revision 595898)
+++ kopete/contactlist/kopetecontactlistview.cpp        (working copy)
@@ -1022,7 +1022,7 @@
                                }
                        }
                }
-               e->acceptAction();
+               e->accept();
        }
 }
 
Index: kopete/main.cpp
===================================================================
--- kopete/main.cpp     (revision 595898)
+++ kopete/main.cpp     (working copy)
@@ -89,8 +89,8 @@
        aboutData.addCredit ( "Hendrik vom Lehn", I18N_NOOP("Former 
developer"), "[EMAIL PROTECTED]", "http://www.hennevl.de";);
        aboutData.addCredit ( "Gav Wood", I18N_NOOP("Former developer and 
WinPopup maintainer"), "[EMAIL PROTECTED]" );
 
-       aboutData.setTranslator( I18N_NOOP2("NAME OF TRANSLATORS","Your names"),
-               I18N_NOOP2("EMAIL OF TRANSLATORS","Your emails") );
+       aboutData.setTranslator( ki18nc("NAME OF TRANSLATORS","Your names"),
+               ki18nc("EMAIL OF TRANSLATORS","Your emails") );
 
        KCmdLineArgs::init( argc, argv, &aboutData );
        KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
Index: kopete/kopeteapplication.cpp
===================================================================
--- kopete/kopeteapplication.cpp        (revision 595898)
+++ kopete/kopeteapplication.cpp        (working copy)
@@ -258,8 +258,6 @@
 //     kDebug(14000) << k_funcinfo << endl;
        handleURLArgs();
 
-       setMainWidget( m_mainWindow );
-
        return KUniqueApplication::newInstance();
 }
 
Index: kopete/config/plugins/kopetepluginconfig.cpp
===================================================================
--- kopete/config/plugins/kopetepluginconfig.cpp        (revision 595898)
+++ kopete/config/plugins/kopetepluginconfig.cpp        (working copy)
@@ -46,7 +46,7 @@
 {
        d->pluginSelector = new KPluginSelector( this );
        
-       QVBoxLayout *mainLayout = new QVBoxLayout(this);
+       QHBoxLayout *mainLayout = new QHBoxLayout(this);
        mainLayout->addWidget( d->pluginSelector );
 
        connect( d->pluginSelector, SIGNAL( changed( bool ) ), this, SLOT( 
changed( bool ) ) );
Index: kopete/chatwindow/kopetechatwindow.cpp
===================================================================
--- kopete/chatwindow/kopetechatwindow.cpp      (revision 595898)
+++ kopete/chatwindow/kopetechatwindow.cpp      (working copy)
@@ -639,7 +639,11 @@
        }
        QPixmap pluginIcon = c ? view->msgManager()->contactOnlineStatus( c 
).iconFor( c) : SmallIcon( view->msgManager()->protocol()->pluginIcon() );
 
-       view->reparent( m_tabBar, 0, QPoint(), true );
+       view->setParent( m_tabBar );
+    view->setWindowFlags( 0 );
+    view->move( QPoint() );
+    view->show();
+    
        m_tabBar->addTab( view, pluginIcon, view->caption() );
        if( view == m_activeView )
                view->show();
@@ -655,7 +659,9 @@
        //TODO figure out what else we have to save here besides the font
        //reparent clears a lot of stuff out
        QFont savedFont = view->font();
-       view->reparent( mainArea, 0, QPoint(), true );
+       view->setParent( mainArea );
+    view->setWindowFlags( 0 );
+    view->move( QPoint() );
        view->setFont( savedFont );
        view->show();
 
@@ -924,7 +930,7 @@
        }
 
        if ( m_tabBar )
-               m_tabBar->setTabIconSet( view, c ? 
view->msgManager()->contactOnlineStatus( c ).iconFor( c ) :
+               m_tabBar->setTabIcon(m_tabBar->indexOf( view ), c ? 
view->msgManager()->contactOnlineStatus( c ).iconFor( c ) :
                                                   SmallIcon( 
view->msgManager()->protocol()->pluginIcon() ) );
 }
 
@@ -1211,7 +1217,7 @@
 void KopeteChatWindow::updateChatTooltip( ChatView* cv )
 {
        if ( m_tabBar )
-               m_tabBar->setTabToolTip( cv, 
QString::fromLatin1("<qt>%1</qt>").arg( cv->caption() ) );
+               m_tabBar->setTabToolTip( m_tabBar->indexOf( cv ), 
QString::fromLatin1("<qt>%1</qt>").arg( cv->caption() ) );
 }
 
 void KopeteChatWindow::updateChatLabel()
Index: kopete/chatwindow/chatview.cpp
===================================================================
--- kopete/chatwindow/chatview.cpp      (revision 595898)
+++ kopete/chatwindow/chatview.cpp      (working copy)
@@ -950,7 +950,7 @@
                                addText( (*it).url() );
                        }
                }
-               event->acceptAction();
+               event->accept();
                return;
        }
        else
Index: kopete/chatwindow/kopeteemailwindow.cpp
===================================================================
--- kopete/chatwindow/kopeteemailwindow.cpp     (revision 595898)
+++ kopete/chatwindow/kopeteemailwindow.cpp     (working copy)
@@ -334,7 +334,10 @@
                        slotReadNext();
                else
                {
-                       d->btnReadNext->setPaletteForegroundColor( 
QColor("red") );
+                       QPalette palette;
+                       palette.setColor(d->btnReadNext->foregroundRole(), 
QColor("red") );
+                       d->btnReadNext->setPalette(palette);
+                               
                        updateNextButton();
                }
 
@@ -355,7 +358,9 @@
        {
                d->btnReadNext->setEnabled( false );
 
-               d->btnReadNext->setPaletteForegroundColor( 
KGlobalSettings::textColor() );
+               QPalette palette;
+               palette.setColor(d->btnReadNext->foregroundRole(), 
KGlobalSettings::textColor() );
+               d->btnReadNext->setPalette(palette);
        }
        else
                d->btnReadNext->setEnabled( true );
Index: libkopete/avdevice/videodevicepool.cpp
===================================================================
--- libkopete/avdevice/videodevicepool.cpp      (revision 595898)
+++ libkopete/avdevice/videodevicepool.cpp      (working copy)
@@ -552,7 +552,7 @@
        {
                for (unsigned int loop=0; loop < m_videodevice.size(); loop++)
                {
-                       combobox->insertItem(m_videodevice[loop].m_name);
+                       combobox->addItem(m_videodevice[loop].m_name);
                        kDebug() <<  k_funcinfo << "DeviceKCombobox: Added 
device " << loop << ": " << m_videodevice[loop].m_name << endl;
                }
                combobox->setCurrentIndex(currentDevice());
@@ -575,7 +575,7 @@
                {
                        for (unsigned int loop=0; loop < 
m_videodevice[currentDevice()].inputs(); loop++)
                        {
-                               
combobox->insertItem(m_videodevice[currentDevice()].m_input[loop].name);
+                               
combobox->addItem(m_videodevice[currentDevice()].m_input[loop].name);
                                kDebug() <<  k_funcinfo << "InputKCombobox: 
Added input " << loop << ": " << 
m_videodevice[currentDevice()].m_input[loop].name << " (tuner: " << 
m_videodevice[currentDevice()].m_input[loop].hastuner << ")" << endl;
                        }
                        combobox->setCurrentIndex(currentInput());
@@ -600,7 +600,7 @@
                        for (unsigned int loop=0; loop < 25; loop++)
                        {
                                if ( 
(m_videodevice[currentDevice()].m_input[currentInput()].m_standards) & (1 << 
loop) )
-                                       
combobox->insertItem(m_videodevice[currentDevice()].signalStandardName( 1 << 
loop));
+                                       
combobox->addItem(m_videodevice[currentDevice()].signalStandardName( 1 << 
loop));
 /*
                                case STANDARD_PAL_B1    : return 
V4L2_STD_PAL_B1;       break;
                                case STANDARD_PAL_G     : return 
V4L2_STD_PAL_G;        break;
@@ -657,14 +657,14 @@
 #if defined(__linux__) && defined(ENABLE_AV)
        QDir videodevice_dir;
        const QString videodevice_dir_path=QString::fromLocal8Bit("/dev/v4l/");
-       const QString videodevice_dir_filter=QString::fromLocal8Bit("video*");
+       const QStringList 
videodevice_dir_filter(QString::fromLocal8Bit("video*"));
        VideoDevice videodevice;
 
        m_videodevice.clear();
        m_modelvector.clear();
 
        videodevice_dir.setPath(videodevice_dir_path);
-       videodevice_dir.setNameFilter(videodevice_dir_filter);
+       videodevice_dir.setNameFilters(videodevice_dir_filter);
         videodevice_dir.setFilter( QDir::System | QDir::NoSymLinks | 
QDir::Readable | QDir::Writable );
         videodevice_dir.setSorting( QDir::Name );
 
@@ -675,11 +675,11 @@
                kDebug() << k_funcinfo << "Found no suitable devices in " << 
videodevice_dir_path << endl;
                QDir videodevice_dir;
                const QString 
videodevice_dir_path=QString::fromLocal8Bit("/dev/");
-               const QString 
videodevice_dir_filter=QString::fromLocal8Bit("video*");
+               const QStringList 
videodevice_dir_filter(QString::fromLocal8Bit("video*"));
                VideoDevice videodevice;
 
                videodevice_dir.setPath(videodevice_dir_path);
-               videodevice_dir.setNameFilter(videodevice_dir_filter);
+               videodevice_dir.setNameFilters(videodevice_dir_filter);
                videodevice_dir.setFilter( QDir::System | QDir::NoSymLinks | 
QDir::Readable | QDir::Writable );
                videodevice_dir.setSorting( QDir::Name );
 
Index: libkopete/kopetecommandhandler.cpp
===================================================================
--- libkopete/kopetecommandhandler.cpp  (revision 595898)
+++ libkopete/kopetecommandhandler.cpp  (working copy)
@@ -16,7 +16,6 @@
 
 #include <kapplication.h>
 #include <qregexp.h>
-//Added by qt3to4:
 #include <QList>
 #include <kdebug.h>
 #include <klocale.h>
@@ -64,14 +63,13 @@
                                KAction *a = static_cast<KAction*>( it.value() 
);
                                actionCollection()->insert( a );
                                QDomElement newNode = doc.createElement( 
QString::fromLatin1("Action") );
-                               newNode.setAttribute( 
QString::fromLatin1("name"),
-                                       QString::fromLatin1( a->name() ) );
+                               newNode.setAttribute( 
QString::fromLatin1("name"), a->objectName() );
 
                                bool added = false;
                                for( QDomElement n = 
menu.firstChild().toElement();
                                        !n.isNull(); n = 
n.nextSibling().toElement() )
                                {
-                                       if( QString::fromLatin1(a->name()) < 
n.attribute(QString::fromLatin1("name")))
+                                       if( a->objectName() < 
n.attribute(QString::fromLatin1("name")))
                                        {
                                                menu.insertBefore( newNode, n );
                                                added = true;
Index: libkopete/kopetecommand.cpp
===================================================================
--- libkopete/kopetecommand.cpp (revision 595898)
+++ libkopete/kopetecommand.cpp (working copy)
@@ -113,7 +113,7 @@
                        "\"%1\" has a maximum of %n arguments.", m_minArgs,
                          text() ), manager, gui );
        }
-       else if( !KAuthorized::authorizeKAction( name() ) )
+       else if( !KAuthorized::authorizeKAction( objectName() ) )
        {
                printError( i18n("You are not authorized to perform the command 
\"%1\".", text()), manager, gui );
        }
_______________________________________________
kopete-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kopete-devel

Reply via email to