[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kio-extras] thumbnail: Move imagethumbnail away from KDE4Support
From: Maarten De Meyer <de.meyer.maarten () gmail ! com>
Date: 2014-09-08 19:29:18
Message-ID: E1XR4co-00071c-Gc () scm ! kde ! org
[Download RAW message or body]
Git commit c49470213d438c8ce91e3c5d4aca688c759b7dac by Maarten De Meyer.
Committed on 03/09/2014 at 23:28.
Pushed by demeyer into branch 'master'.
Move imagethumbnail away from KDE4Support
Remove unused includes and we don't need KDE4Support anymore.
I also did some small indentation changes.
REVIEW: 120058
M +1 -6 thumbnail/CMakeLists.txt
M +2 -6 thumbnail/imagecreator.cpp
M +4 -2 thumbnail/imagecreator.h
http://commits.kde.org/kio-extras/c49470213d438c8ce91e3c5d4aca688c759b7dac
diff --git a/thumbnail/CMakeLists.txt b/thumbnail/CMakeLists.txt
index bd40c0e..cd1263a 100644
--- a/thumbnail/CMakeLists.txt
+++ b/thumbnail/CMakeLists.txt
@@ -54,12 +54,7 @@ set(imagethumbnail_PART_SRCS imagecreator.cpp)
add_library(imagethumbnail MODULE ${imagethumbnail_PART_SRCS})
target_link_libraries(imagethumbnail
- KF5::CoreAddons
- KF5::KIOCore
- KF5::KIOWidgets
- KF5::Solid
- KF5::KDE4Support
- KF5::I18n
+ KF5::KIOWidgets
)
install(TARGETS imagethumbnail DESTINATION ${PLUGIN_INSTALL_DIR})
diff --git a/thumbnail/imagecreator.cpp b/thumbnail/imagecreator.cpp
index dd5ffe2..46c07dc 100644
--- a/thumbnail/imagecreator.cpp
+++ b/thumbnail/imagecreator.cpp
@@ -20,12 +20,8 @@
#include "imagecreator.h"
-#include <assert.h>
-
#include <QtGui/QImage>
-#include <kdemacros.h>
-
extern "C"
{
Q_DECL_EXPORT ThumbCreator *new_creator()
@@ -38,9 +34,9 @@ bool ImageCreator::create(const QString &path, int, int, QImage &img)
{
// create image preview
if (!img.load( path ))
- return false;
+ return false;
if (img.depth() != 32)
- img = img.convertToFormat(img.hasAlphaChannel() ? QImage::Format_ARGB32 : QImage::Format_RGB32);
+ img = img.convertToFormat(img.hasAlphaChannel() ? QImage::Format_ARGB32 : QImage::Format_RGB32);
return true;
}
diff --git a/thumbnail/imagecreator.h b/thumbnail/imagecreator.h
index d06c9fa..6bca78b 100644
--- a/thumbnail/imagecreator.h
+++ b/thumbnail/imagecreator.h
@@ -20,14 +20,16 @@
#ifndef _IMAGECREATOR_H_
#define _IMAGECREATOR_H_
+#include <QtGlobal>
+
#include <kio/thumbcreator.h>
class ImageCreator : public ThumbCreator
{
public:
ImageCreator() {}
- virtual bool create(const QString &path, int, int, QImage &img);
- virtual Flags flags() const;
+ virtual bool create(const QString &path, int, int, QImage &img) Q_DECL_OVERRIDE;
+ virtual Flags flags() const Q_DECL_OVERRIDE;
};
#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic