[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/kontact/src
From: Rafael Fernández López <ereslibre () kde ! org>
Date: 2008-07-02 17:16:57
Message-ID: 1215019017.050122.7820.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 827337 by ereslibre:
This reinterpret_cast is not dangerous, since all pointers have the same size, but for sure not polite.
CCMAIL: faure@kde.org
M +3 -5 mainwindow.cpp
M +1 -1 mainwindow.h
--- trunk/KDE/kdepim/kontact/src/mainwindow.cpp #827336:827337
@@ -164,8 +164,7 @@
mSidePane->setMaximumWidth( mSidePane->sizeHint().width() );
mSidePane->setMinimumWidth( mSidePane->sizeHint().width() );
- factory()->plugActionList( this, QString( "navigator_actionlist" ),
- *reinterpret_cast<QList<QAction*>*>( &mActionPlugins ) );
+ factory()->plugActionList( this, QString( "navigator_actionlist" ), mActionPlugins );
}
void MainWindow::initGUI()
@@ -532,13 +531,12 @@
ActionPluginList::ConstIterator it;
int i = 1;
for ( it = mActionPlugins.begin(); it != end; ++it ) {
- KAction *action = *it;
+ KAction *action = static_cast<KAction*>( *it );
QString shortcut = QString( "Ctrl+%1" ).arg( i );
action->setShortcut( KShortcut( shortcut ) );
i++;
}
- factory()->plugActionList( this, QString( "navigator_actionlist" ),
- *reinterpret_cast<QList<QAction*>*>( &mActionPlugins ) );
+ factory()->plugActionList( this, QString( "navigator_actionlist" ), mActionPlugins );
}
bool MainWindow::removePlugin( const KPluginInfo &info )
--- trunk/KDE/kdepim/kontact/src/mainwindow.h #827336:827337
@@ -52,7 +52,7 @@
class AboutDialog;
typedef QList<Kontact::Plugin*> PluginList;
-typedef QList<KAction*> ActionPluginList;
+typedef QList<QAction*> ActionPluginList;
class KONTACT_EXPORT MainWindow : public Kontact::Core
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic