[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kio/kio
From: Michel Hermier <michel.hermier () wanadoo ! fr>
Date: 2005-10-25 8:19:15
Message-ID: 1130228355.703174.5223.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 473995 by hermier:
--(KSharedPtr wrong type casting usage)
M +4 -9 kimageio.cpp
M +4 -8 kservicetypefactory.cpp
M +1 -0 paste.cpp
--- trunk/KDE/kdelibs/kio/kio/kimageio.cpp #473994:473995
@@ -200,26 +200,21 @@
QString allPatterns;
QString wildCard("*.");
QString separator("|");
- for( KImageIOFormatList::ConstIterator it = formatList->begin();
- it != formatList->end();
- ++it )
+ foreach( const KSharedPtr<KImageIOFormat> &format, *formatList )
{
- KImageIOFormat *format = (*it).get();
if (((_mode == KImageIO::Reading) && format->bRead) ||
((_mode == KImageIO::Writing) && format->bWrite))
{
QString pattern;
QStringList suffices = format->mSuffices;
- for( QStringList::ConstIterator it = suffices.begin();
- it != suffices.end();
- ++it)
+ foreach(const QString &suffix, format->mSuffices)
{
if (!pattern.isEmpty())
pattern += " ";
- pattern = pattern + wildCard+(*it);
+ pattern = pattern + wildCard + suffix;
if (!allPatterns.isEmpty())
allPatterns += " ";
- allPatterns = allPatterns + wildCard +(*it);
+ allPatterns = allPatterns + wildCard + suffix;
}
if (!pattern.isEmpty())
{
--- trunk/KDE/kdelibs/kio/kio/kservicetypefactory.cpp #473994:473995
@@ -219,9 +219,9 @@
it != list.end();
++it)
{
- KMimeType *newMimeType = dynamic_cast<KMimeType *>((*it).data());
+ KMimeType::Ptr newMimeType = *it;
if (newMimeType)
- result.append( KMimeType::Ptr( newMimeType ) );
+ result.append( newMimeType );
}
return result;
}
@@ -234,13 +234,9 @@
it != list.end();
++it)
{
-#ifndef Q_WS_QWS
- KServiceType *newServiceType = dynamic_cast<KServiceType *>((*it).data());
-#else //FIXME
- KServiceType *newServiceType = (KServiceType*)(*it).data();
-#endif
+ KServiceType::Ptr newServiceType = *it;
if (newServiceType)
- result.append( KServiceType::Ptr( newServiceType ) );
+ result.append( newServiceType );
}
return result;
}
--- trunk/KDE/kdelibs/kio/kio/paste.cpp #473994:473995
@@ -38,6 +38,7 @@
#include <qapplication.h>
#include <qclipboard.h>
+#include <QMimeData>
#include <qtextstream.h>
#include <QMimeData>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic