mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
kioslave: drop support for sequenced thumbnails
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
10dd9938c7
commit
866ba072f1
3 changed files with 1 additions and 15 deletions
|
@ -57,4 +57,3 @@ X-KDE-ServiceTypes=ThumbCreator
|
|||
X-KDE-PluginInfo-EnabledByDefault=true
|
||||
MimeType=inode/directory;
|
||||
CacheThumbnail=false
|
||||
HandleSequences=true
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
|
||||
#include <config-workspace.h> // For HAVE_NICE
|
||||
#include <kio/thumbcreator.h>
|
||||
#include <kio/thumbsequencecreator.h>
|
||||
#include <kconfiggroup.h>
|
||||
|
||||
#include <iostream>
|
||||
|
@ -171,10 +170,6 @@ void ThumbnailProtocol::get(const KUrl &url)
|
|||
return;
|
||||
}
|
||||
|
||||
ThumbSequenceCreator* sequenceCreator = dynamic_cast<ThumbSequenceCreator*>(creator);
|
||||
if(sequenceCreator)
|
||||
sequenceCreator->setSequenceIndex(sequenceIndex());
|
||||
|
||||
if (!creator->create(url.path(), m_width, m_height, img)) {
|
||||
error(KIO::ERR_INTERNAL, i18n("Cannot create thumbnail for %1", url.path()));
|
||||
return;
|
||||
|
@ -255,10 +250,6 @@ QString ThumbnailProtocol::pluginForMimeType(const QString& mimeType) {
|
|||
return QString();
|
||||
}
|
||||
|
||||
float ThumbnailProtocol::sequenceIndex() const {
|
||||
return metaData("sequence-index").toFloat();
|
||||
}
|
||||
|
||||
bool ThumbnailProtocol::isOpaque(const QImage &image) const
|
||||
{
|
||||
// Test the corner pixels
|
||||
|
@ -371,9 +362,6 @@ QImage ThumbnailProtocol::thumbForDirectory(const KUrl& directory)
|
|||
|
||||
QString localFile = directory.path();
|
||||
|
||||
// Multiply with a high number, so we get some semi-random sequence
|
||||
int skipValidItems = ((int)sequenceIndex()) * tiles * tiles;
|
||||
|
||||
img = QImage(QSize(folderWidth, folderHeight), QImage::Format_ARGB32);
|
||||
img.fill(0);
|
||||
|
||||
|
@ -392,6 +380,7 @@ QImage ThumbnailProtocol::thumbForDirectory(const KUrl& directory)
|
|||
int iterations = 0;
|
||||
QString hadFirstThumbnail;
|
||||
int skipped = 0;
|
||||
int skipValidItems = 0;
|
||||
|
||||
const int maxYPos = folderHeight - bottomMargin - segmentHeight;
|
||||
|
||||
|
|
|
@ -54,8 +54,6 @@ protected:
|
|||
QImage thumbForDirectory(const KUrl& directory);
|
||||
QString pluginForMimeType(const QString& mimeType);
|
||||
|
||||
float sequenceIndex() const;
|
||||
|
||||
private:
|
||||
/**
|
||||
* Creates a sub thumbnail for the directory thumbnail. If a cached
|
||||
|
|
Loading…
Add table
Reference in a new issue