mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 10:52:49 +00:00
generic: misc cleanups
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
66aa3a1ca4
commit
3341730586
6 changed files with 11 additions and 36 deletions
|
@ -319,11 +319,6 @@ KUrl::List KUrl::List::fromMimeData(const QMimeData *mimeData,
|
|||
return uris;
|
||||
}
|
||||
|
||||
KUrl::List KUrl::List::fromMimeData( const QMimeData *mimeData, KUrl::MetaDataMap* metaData )
|
||||
{
|
||||
return fromMimeData(mimeData, PreferKdeUrls, metaData);
|
||||
}
|
||||
|
||||
KUrl::List::operator QVariant() const
|
||||
{
|
||||
return qVariantFromValue(*this);
|
||||
|
@ -1003,11 +998,6 @@ QString KUrl::prettyUrl( int _trailing, AdjustementFlags _flags) const
|
|||
}
|
||||
#endif
|
||||
|
||||
QString KUrl::pathOrUrl() const
|
||||
{
|
||||
return pathOrUrl(LeaveTrailingSlash);
|
||||
}
|
||||
|
||||
QString KUrl::pathOrUrl(AdjustPathOption trailing) const
|
||||
{
|
||||
if ( isLocalFile() && fragment().isNull() && encodedQuery().isNull() ) {
|
||||
|
|
|
@ -271,16 +271,6 @@ public:
|
|||
*/
|
||||
static QStringList mimeDataTypes();
|
||||
|
||||
/**
|
||||
* Extract a list of KUrls from the contents of @p mimeData.
|
||||
* Decoding will fail if @p mimeData does not contain any URLs, or if at
|
||||
* least one extracted URL is not valid.
|
||||
* @param mimeData the mime data to extract from; cannot be 0
|
||||
* @param metaData optional pointer to a map holding the metadata
|
||||
* @return the list of urls
|
||||
*/
|
||||
static KUrl::List fromMimeData( const QMimeData *mimeData, KUrl::MetaDataMap* metaData = 0 );
|
||||
|
||||
/**
|
||||
* Flags to be used in fromMimeData.
|
||||
* @since 4.2.3
|
||||
|
@ -313,7 +303,7 @@ public:
|
|||
* @since 4.2.3
|
||||
*/
|
||||
static KUrl::List fromMimeData( const QMimeData *mimeData,
|
||||
DecodeOptions decodeOptions, // TODO KDE5: = PreferKdeUrls, and merge with above
|
||||
DecodeOptions decodeOptions = PreferKdeUrls,
|
||||
KUrl::MetaDataMap* metaData = 0 );
|
||||
|
||||
};
|
||||
|
@ -837,15 +827,11 @@ public:
|
|||
* You can give the result of pathOrUrl back to the KUrl constructor, it accepts
|
||||
* both paths and urls.
|
||||
*
|
||||
* @return the new KUrl
|
||||
*/
|
||||
QString pathOrUrl() const;
|
||||
/**
|
||||
* Overload with @p trailing parameter
|
||||
* @param trailing use to add or remove a trailing slash to/from the path. see adjustPath.
|
||||
* @return the new KUrl
|
||||
* @since 4.2
|
||||
*/
|
||||
QString pathOrUrl(AdjustPathOption trailing) const; // KDE5: merge with above. Rename to toUrlOrLocalFile?
|
||||
QString pathOrUrl(AdjustPathOption trailing = LeaveTrailingSlash) const;
|
||||
|
||||
/**
|
||||
* Returns the URL as a string, using the standard conventions for mime data
|
||||
|
|
|
@ -7,7 +7,6 @@ endif()
|
|||
if(NOT STRIGI_FOUND)
|
||||
set(KIO_NO_STRIGI TRUE)
|
||||
endif()
|
||||
set(KIO_NO_STRIGI TRUE)
|
||||
|
||||
if(OPENSSL_FOUND)
|
||||
set(KSSL_HAVE_SSL 1)
|
||||
|
|
|
@ -1246,7 +1246,7 @@ KFileMetaInfo KFileItem::metaInfo(bool autoget, int what) const
|
|||
{
|
||||
bool isLocalUrl;
|
||||
KUrl url(mostLocalUrl(isLocalUrl));
|
||||
d->m_metaInfo = KFileMetaInfo(url.toLocalFile(), mimetype(), (KFileMetaInfo::What)what);
|
||||
d->m_metaInfo = KFileMetaInfo(url.toLocalFile(), (KFileMetaInfo::What)what);
|
||||
}
|
||||
return d->m_metaInfo;
|
||||
}
|
||||
|
|
|
@ -261,7 +261,6 @@ void KFileMetaInfoPrivate::init ( QIODevice& stream, const KUrl& url, time_t mti
|
|||
|
||||
void KFileMetaInfoPrivate::initWriters ( const KUrl& file )
|
||||
{
|
||||
QStringList mimetypes;
|
||||
QHash<QString, KFileMetaInfoItem>::iterator i;
|
||||
for ( i = items.begin(); i != items.end(); ++i ) {
|
||||
KFileWritePlugin *w =
|
||||
|
@ -272,8 +271,7 @@ void KFileMetaInfoPrivate::initWriters ( const KUrl& file )
|
|||
}
|
||||
}
|
||||
|
||||
KFileMetaInfo::KFileMetaInfo ( const QString& path, const QString& /*mimetype*/,
|
||||
KFileMetaInfo::WhatFlags w )
|
||||
KFileMetaInfo::KFileMetaInfo ( const QString& path, KFileMetaInfo::WhatFlags w )
|
||||
: d ( new KFileMetaInfoPrivate() )
|
||||
{
|
||||
QFileInfo fileinfo ( path );
|
||||
|
@ -392,8 +390,7 @@ class KFileMetaInfoPrivate : public QSharedData
|
|||
public:
|
||||
};
|
||||
|
||||
KFileMetaInfo::KFileMetaInfo ( const QString& path, const QString& /*mimetype*/,
|
||||
KFileMetaInfo::WhatFlags w )
|
||||
KFileMetaInfo::KFileMetaInfo ( const QString& path, KFileMetaInfo::WhatFlags w )
|
||||
{
|
||||
Q_UNUSED(path);
|
||||
Q_UNUSED(w);
|
||||
|
|
|
@ -87,9 +87,12 @@ public:
|
|||
* the resource pointed to by @p path.
|
||||
*
|
||||
* When w is not Everything, a limit of 64kbytes is imposed on the file size.
|
||||
* @note The path must be full (start with a slash) or relative, e.g.
|
||||
* "/home/joe/pic.png" or "../joe/pic.png". If it starts with a URL scheme,
|
||||
* e.g. "file:///home/joe/pic.png" it will be considered invalid. If it may
|
||||
* start with URL scheme use the constructor that takes KUrl.
|
||||
**/
|
||||
explicit KFileMetaInfo(const QString& path, const QString& mimetype = QString(),
|
||||
WhatFlags w = Everything);
|
||||
explicit KFileMetaInfo(const QString& path, WhatFlags w = Everything);
|
||||
/**
|
||||
* @brief Construct a KFileMetaInfo that contains metainformation about
|
||||
* the resource pointed to by @p url.
|
||||
|
|
Loading…
Add table
Reference in a new issue