[Debian-astro-commits] [stellarium] 02/03: debian/patches: fix #786715
Tomasz Buchert
tomasz at moszumanska.debian.org
Wed Jun 3 11:11:31 UTC 2015
This is an automated email from the git hooks/post-receive script.
tomasz pushed a commit to branch fix-786715
in repository stellarium.
commit 0305fba27c09e9da4421747c6f3ed72923ce19bb
Author: Tomasz Buchert <tomasz at debian.org>
Date: Mon May 25 14:38:54 2015 +0200
debian/patches: fix #786715
---
.../0001-Put-QZip-into-a-separated-namespace.patch | 170 +++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 171 insertions(+)
diff --git a/debian/patches/0001-Put-QZip-into-a-separated-namespace.patch b/debian/patches/0001-Put-QZip-into-a-separated-namespace.patch
new file mode 100644
index 0000000..af97640
--- /dev/null
+++ b/debian/patches/0001-Put-QZip-into-a-separated-namespace.patch
@@ -0,0 +1,170 @@
+From: Tomasz Buchert <tomasz at debian.org>
+Date: Mon, 25 May 2015 14:38:09 +0200
+Subject: Put QZip* into a separated namespace
+
+This patch is in response to https://bugs.debian.org/786715.
+---
+ src/CMakeLists.txt | 2 +-
+ src/core/external/qtcompress/qzip.cpp | 18 +++++++++---------
+ src/core/external/qtcompress/qzipreader.h | 14 ++++++++------
+ src/core/external/qtcompress/qzipwriter.h | 12 +++++++-----
+ src/core/modules/LandscapeMgr.cpp | 10 +++++-----
+ 5 files changed, 30 insertions(+), 26 deletions(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index ba76c02..257668e 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -243,7 +243,7 @@ SET(stellarium_lib_SRCS
+ )
+
+ # On windows, QZipReader is already included in the lib
+-IF(!WIN32)
++IF(NOT WIN32)
+ SET(stellarium_lib_SRCS ${stellarium_lib_SRCS}
+ core/external/qtcompress/qzip.cpp
+ core/external/qtcompress/qzipreader.h
+diff --git a/src/core/external/qtcompress/qzip.cpp b/src/core/external/qtcompress/qzip.cpp
+index 2675875..95a15c5 100644
+--- a/src/core/external/qtcompress/qzip.cpp
++++ b/src/core/external/qtcompress/qzip.cpp
+@@ -39,17 +39,15 @@
+ **
+ ****************************************************************************/
+
+-#include <qglobal.h>
+-
+ #ifndef QT_NO_TEXTODFWRITER
+
+ #include "qzipreader.h"
+ #include "qzipwriter.h"
+-#include <qdatetime.h>
+-#include <qplatformdefs.h>
+-#include <qendian.h>
+-#include <qdebug.h>
+-#include <qdir.h>
++
++#include <sys/stat.h>
++#include <QDateTime>
++#include <QDebug>
++#include <QDir>
+
+ #include <zlib.h>
+
+@@ -101,7 +99,8 @@
+ #define ZDEBUG if (0) qDebug
+ #endif
+
+-QT_BEGIN_NAMESPACE
++// QT_BEGIN_NAMESPACE
++namespace Stel {
+
+ static inline uint readUInt(const uchar *data)
+ {
+@@ -1390,6 +1389,7 @@ void QZipWriter::close()
+ d->device->close();
+ }
+
+-QT_END_NAMESPACE
++// QT_END_NAMESPACE
++}
+
+ #endif // QT_NO_TEXTODFWRITER
+diff --git a/src/core/external/qtcompress/qzipreader.h b/src/core/external/qtcompress/qzipreader.h
+index d263191..60635db 100644
+--- a/src/core/external/qtcompress/qzipreader.h
++++ b/src/core/external/qtcompress/qzipreader.h
+@@ -42,13 +42,14 @@
+ #ifndef QZIPREADER_H
+ #define QZIPREADER_H
+
+-#include <QtCore/qglobal.h>
++#include <QtGlobal>
+
+-#include <QtCore/qdatetime.h>
+-#include <QtCore/qfile.h>
+-#include <QtCore/qstring.h>
++#include <QDateTime>
++#include <QFile>
++#include <QString>
+
+-QT_BEGIN_NAMESPACE
++// QT_BEGIN_NAMESPACE
++namespace Stel {
+
+ class QZipReaderPrivate;
+
+@@ -107,6 +108,7 @@ private:
+ Q_DISABLE_COPY(QZipReader)
+ };
+
+-QT_END_NAMESPACE
++// QT_END_NAMESPACE
++}
+
+ #endif // QZIPREADER_H
+diff --git a/src/core/external/qtcompress/qzipwriter.h b/src/core/external/qtcompress/qzipwriter.h
+index b54a8d3..9e6e78c 100644
+--- a/src/core/external/qtcompress/qzipwriter.h
++++ b/src/core/external/qtcompress/qzipwriter.h
+@@ -41,11 +41,12 @@
+ #ifndef QZIPWRITER_H
+ #define QZIPWRITER_H
+
+-#include <QtCore/qglobal.h>
+-#include <QtCore/qstring.h>
+-#include <QtCore/qfile.h>
++#include <QtGlobal>
++#include <QString>
++#include <QFile>
+
+-QT_BEGIN_NAMESPACE
++// QT_BEGIN_NAMESPACE
++namespace Stel {
+
+ class QZipWriterPrivate;
+
+@@ -98,6 +99,7 @@ private:
+ Q_DISABLE_COPY(QZipWriter)
+ };
+
+-QT_END_NAMESPACE
++// QT_END_NAMESPACE
++}
+
+ #endif // QZIPWRITER_H
+diff --git a/src/core/modules/LandscapeMgr.cpp b/src/core/modules/LandscapeMgr.cpp
+index 2e3ecfd..c17b26c 100644
+--- a/src/core/modules/LandscapeMgr.cpp
++++ b/src/core/modules/LandscapeMgr.cpp
+@@ -815,8 +815,8 @@ QString LandscapeMgr::installLandscapeFromArchive(QString sourceFilePath, const
+ }
+ QDir destinationDir (parentDestinationDir.absoluteFilePath("landscapes"));
+
+- QZipReader reader(sourceFilePath);
+- if (reader.status() != QZipReader::NoError)
++ Stel::QZipReader reader(sourceFilePath);
++ if (reader.status() != Stel::QZipReader::NoError)
+ {
+ qWarning() << "LandscapeMgr: Unable to open as a ZIP archive:" << QDir::toNativeSeparators(sourceFilePath);
+ emit errorNotArchive();
+@@ -825,8 +825,8 @@ QString LandscapeMgr::installLandscapeFromArchive(QString sourceFilePath, const
+
+ //Detect top directory
+ QString topDir, iniPath;
+- QList<QZipReader::FileInfo> infoList = reader.fileInfoList();
+- foreach(QZipReader::FileInfo info, infoList)
++ QList<Stel::QZipReader::FileInfo> infoList = reader.fileInfoList();
++ foreach(Stel::QZipReader::FileInfo info, infoList)
+ {
+ QFileInfo fileInfo(info.filePath);
+ if (fileInfo.fileName() == "landscape.ini")
+@@ -890,7 +890,7 @@ QString LandscapeMgr::installLandscapeFromArchive(QString sourceFilePath, const
+ return QString();
+ }
+ destinationDir.cd(landscapeID);
+- foreach(QZipReader::FileInfo info, infoList)
++ foreach(Stel::QZipReader::FileInfo info, infoList)
+ {
+ QFileInfo fileInfo(info.filePath);
+ if (info.isFile && fileInfo.dir().path() == topDir)
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..e618d92
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Put-QZip-into-a-separated-namespace.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/stellarium.git
More information about the Debian-astro-commits
mailing list