From c4e79ef1f99b5802d78e1d7b68ee086e63a183be Mon Sep 17 00:00:00 2001 From: ABBAPOH Date: Fri, 13 Dec 2013 19:08:32 +0400 Subject: Remove main.h in DDS plugin. Change-Id: I86b805d60755c463c321146e923469a9d7b006e4 Reviewed-by: Friedemann Kleint --- src/plugins/imageformats/dds/dds.pro | 1 - src/plugins/imageformats/dds/main.cpp | 13 ++++++- src/plugins/imageformats/dds/main.h | 69 ----------------------------------- 3 files changed, 12 insertions(+), 71 deletions(-) delete mode 100644 src/plugins/imageformats/dds/main.h diff --git a/src/plugins/imageformats/dds/dds.pro b/src/plugins/imageformats/dds/dds.pro index 331a912..b645576 100644 --- a/src/plugins/imageformats/dds/dds.pro +++ b/src/plugins/imageformats/dds/dds.pro @@ -6,7 +6,6 @@ load(qt_plugin) HEADERS += \ ddsheader.h \ - main.h \ qddshandler.h SOURCES += \ diff --git a/src/plugins/imageformats/dds/main.cpp b/src/plugins/imageformats/dds/main.cpp index ef57cc5..b01299f 100644 --- a/src/plugins/imageformats/dds/main.cpp +++ b/src/plugins/imageformats/dds/main.cpp @@ -40,7 +40,7 @@ ** ****************************************************************************/ -#include "main.h" +#include #ifndef QT_NO_IMAGEFORMATPLUGIN @@ -48,6 +48,15 @@ QT_BEGIN_NAMESPACE +class QDDSPlugin : public QImageIOPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "dds.json") +public: + Capabilities capabilities(QIODevice *device, const QByteArray &format) const; + QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const; +}; + QImageIOPlugin::Capabilities QDDSPlugin::capabilities(QIODevice *device, const QByteArray &format) const { if (format == QByteArrayLiteral("dds")) @@ -75,4 +84,6 @@ QImageIOHandler *QDDSPlugin::create(QIODevice *device, const QByteArray &format) QT_END_NAMESPACE +#include "main.moc" + #endif // QT_NO_IMAGEFORMATPLUGIN diff --git a/src/plugins/imageformats/dds/main.h b/src/plugins/imageformats/dds/main.h deleted file mode 100644 index 937caca..0000000 --- a/src/plugins/imageformats/dds/main.h +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Copyright (C) 2013 Ivan Komissarov. -** Contact: http://www.qt-project.org/legal -** -** This file is part of the DDS plugin in the Qt ImageFormats module. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef MAIN_H -#define MAIN_H - -#include - -#ifndef QT_NO_IMAGEFORMATPLUGIN - -#ifdef QT_NO_IMAGEFORMAT_DDS -#undef QT_NO_IMAGEFORMAT_DDS -#endif - -QT_BEGIN_NAMESPACE - -class QDDSPlugin : public QImageIOPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QImageIOHandlerFactoryInterface" FILE "dds.json") -public: - Capabilities capabilities(QIODevice *device, const QByteArray &format) const; - QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const; -}; - -QT_END_NAMESPACE - -#endif // QT_NO_IMAGEFORMATPLUGIN - -#endif // MAIN_H -- cgit v1.2.3