[neon/qt6/qt6-base/Neon/release] debian/patches: refresh patches

Carlos De Maine null at kde.org
Thu Jan 11 08:22:41 GMT 2024


Git commit 1f91cb9ebe0ce38508b7f468c42822107de0309f by Carlos De Maine.
Committed on 11/01/2024 at 06:16.
Pushed by carlosdem into branch 'Neon/release'.

refresh patches

M  +1    -1    debian/patches/armel-noyield.patch
M  +74   -103  debian/patches/qmimedatabase_collect_glob_patterns_from_all_locations

https://invent.kde.org/neon/qt6/qt6-base/-/commit/1f91cb9ebe0ce38508b7f468c42822107de0309f

diff --git a/debian/patches/armel-noyield.patch b/debian/patches/armel-noyield.patch
index 1946a65..6cdf4a3 100644
--- a/debian/patches/armel-noyield.patch
+++ b/debian/patches/armel-noyield.patch
@@ -6,7 +6,7 @@ Description: Don't use yield on CPUs that might not support it
 
 --- a/src/corelib/global/qsimd_p.h
 +++ b/src/corelib/global/qsimd_p.h
-@@ -415,7 +415,9 @@
+@@ -417,7 +417,9 @@
           https://stackoverflow.com/a/70076751/134841
           https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105416
      */
diff --git a/debian/patches/qmimedatabase_collect_glob_patterns_from_all_locations b/debian/patches/qmimedatabase_collect_glob_patterns_from_all_locations
index 4e82a9e..76fa285 100644
--- a/debian/patches/qmimedatabase_collect_glob_patterns_from_all_locations
+++ b/debian/patches/qmimedatabase_collect_glob_patterns_from_all_locations
@@ -37,11 +37,9 @@ Reviewed-by: Thiago Macieira <thiago.macieira at intel.com>
  13 files changed, 258 insertions(+), 328 deletions(-)
  create mode 100644 tests/auto/corelib/mimetypes/qmimedatabase/add-extension.xml
 
-diff --git a/src/corelib/mimetypes/qmimedatabase.cpp b/src/corelib/mimetypes/qmimedatabase.cpp
-index f2786f3723c3..a549cd3acf87 100644
 --- a/src/corelib/mimetypes/qmimedatabase.cpp
 +++ b/src/corelib/mimetypes/qmimedatabase.cpp
-@@ -191,9 +191,8 @@ QMimeType QMimeDatabasePrivate::mimeTypeForName(const QString &nameOrAlias)
+@@ -190,9 +190,8 @@
  {
      const QString mimeName = resolveAlias(nameOrAlias);
      for (const auto &provider : providers()) {
@@ -53,7 +51,7 @@ index f2786f3723c3..a549cd3acf87 100644
      }
      return {};
  }
-@@ -218,54 +217,54 @@ QMimeGlobMatchResult QMimeDatabasePrivate::findByFileName(const QString &fileNam
+@@ -217,54 +216,54 @@
      return result;
  }
  
@@ -143,7 +141,7 @@ index f2786f3723c3..a549cd3acf87 100644
  }
  
  QString QMimeDatabasePrivate::fallbackParent(const QString &mimeTypeName) const
-@@ -346,12 +345,12 @@ QMimeType QMimeDatabasePrivate::findByData(const QByteArray &data, int *accuracy
+@@ -345,12 +344,12 @@
      }
  
      *accuracyPtr = 0;
@@ -160,11 +158,9 @@ index f2786f3723c3..a549cd3acf87 100644
  
      if (isTextFile(data)) {
          *accuracyPtr = 5;
-diff --git a/src/corelib/mimetypes/qmimedatabase_p.h b/src/corelib/mimetypes/qmimedatabase_p.h
-index 96981ba3fe13..cb28f0b7910e 100644
 --- a/src/corelib/mimetypes/qmimedatabase_p.h
 +++ b/src/corelib/mimetypes/qmimedatabase_p.h
-@@ -66,9 +66,10 @@ public:
+@@ -66,9 +66,10 @@
      QMimeGlobMatchResult findByFileName(const QString &fileName);
  
      // API for QMimeType. Takes care of locking the mutex.
@@ -178,7 +174,7 @@ index 96981ba3fe13..cb28f0b7910e 100644
      QStringList mimeParents(const QString &mimeName);
      QStringList listAliases(const QString &mimeName);
      bool mimeInherits(const QString &mime, const QString &parent);
-@@ -81,7 +82,7 @@ private:
+@@ -81,7 +82,7 @@
      QString fallbackParent(const QString &mimeTypeName) const;
  
      const QString m_defaultMimeType;
@@ -187,11 +183,9 @@ index 96981ba3fe13..cb28f0b7910e 100644
      QElapsedTimer m_lastCheck;
  
  public:
-diff --git a/src/corelib/mimetypes/qmimeprovider.cpp b/src/corelib/mimetypes/qmimeprovider.cpp
-index 586a0c64373d..8c97c4f16bc9 100644
 --- a/src/corelib/mimetypes/qmimeprovider.cpp
 +++ b/src/corelib/mimetypes/qmimeprovider.cpp
-@@ -186,25 +186,11 @@ void QMimeBinaryProvider::ensureLoaded()
+@@ -186,25 +186,11 @@
          m_cacheFile.reset();
  }
  
@@ -219,7 +213,7 @@ index 586a0c64373d..8c97c4f16bc9 100644
  }
  
  void QMimeBinaryProvider::addFileNameMatches(const QString &fileName, QMimeGlobMatchResult &result)
-@@ -354,7 +340,7 @@ bool QMimeBinaryProvider::matchMagicRule(QMimeBinaryProvider::CacheFile *cacheFi
+@@ -354,7 +340,7 @@
      return false;
  }
  
@@ -228,7 +222,7 @@ index 586a0c64373d..8c97c4f16bc9 100644
  {
      const int magicListOffset = m_cacheFile->getUint32(PosMagicListOffset);
      const int numMatches = m_cacheFile->getUint32(magicListOffset);
-@@ -371,7 +357,7 @@ void QMimeBinaryProvider::findByMagic(const QByteArray &data, int *accuracyPtr,
+@@ -371,7 +357,7 @@
              *accuracyPtr = m_cacheFile->getUint32(off);
              // Return the first match. We have no rules for conflicting magic data...
              // (mime.cache itself is sorted, but what about local overrides with a lower prio?)
@@ -237,7 +231,7 @@ index 586a0c64373d..8c97c4f16bc9 100644
              return;
          }
      }
-@@ -479,35 +465,63 @@ void QMimeBinaryProvider::addAllMimeTypes(QList<QMimeType> &result)
+@@ -479,35 +465,63 @@
      if (result.isEmpty()) {
          result.reserve(m_mimetypeNames.size());
          for (const QString &name : std::as_const(m_mimetypeNames))
@@ -265,8 +259,7 @@ index 586a0c64373d..8c97c4f16bc9 100644
 +    }
 +    return {};
 +}
- 
--    auto it = m_mimetypeExtra.constFind(data.name);
++
 +bool QMimeBinaryProvider::hasGlobDeleteAll(const QString &name)
 +{
 +    MimeTypeExtraMap::const_iterator it = loadMimeTypeExtra(name);
@@ -276,7 +269,8 @@ index 586a0c64373d..8c97c4f16bc9 100644
 +    }
 +    return {};
 +}
-+
+ 
+-    auto it = m_mimetypeExtra.constFind(data.name);
 +QStringList QMimeBinaryProvider::globPatterns(const QString &name)
 +{
 +    MimeTypeExtraMap::const_iterator it = loadMimeTypeExtra(name);
@@ -312,7 +306,7 @@ index 586a0c64373d..8c97c4f16bc9 100644
          it = insertIt;
          MimeTypeExtra &extra = insertIt.value();
          QString mainPattern;
-@@ -515,13 +529,13 @@ bool QMimeBinaryProvider::loadMimeTypePrivate(QMimeTypePrivate &data)
+@@ -515,13 +529,13 @@
          QXmlStreamReader xml(&qfile);
          if (xml.readNextStartElement()) {
              if (xml.name() != "mime-type"_L1) {
@@ -330,7 +324,7 @@ index 586a0c64373d..8c97c4f16bc9 100644
  
              while (xml.readNextStartElement()) {
                  const auto tag = xml.name();
-@@ -534,8 +548,7 @@ bool QMimeBinaryProvider::loadMimeTypePrivate(QMimeTypePrivate &data)
+@@ -534,8 +548,7 @@
                      extra.localeComments.insert(lang, text);
                      continue; // we called readElementText, so we're at the EndElement already.
                  } else if (tag == "glob-deleteall"_L1) { // as written out by shared-mime-info >= 0.70
@@ -340,7 +334,7 @@ index 586a0c64373d..8c97c4f16bc9 100644
                  } else if (tag == "glob"_L1) { // as written out by shared-mime-info >= 0.70
                      const QString pattern = xml.attributes().value("pattern"_L1).toString();
                      if (mainPattern.isEmpty() && pattern.startsWith(u'*')) {
-@@ -557,14 +570,11 @@ bool QMimeBinaryProvider::loadMimeTypePrivate(QMimeTypePrivate &data)
+@@ -557,14 +570,11 @@
              extra.globPatterns.prepend(mainPattern);
          }
      }
@@ -358,7 +352,7 @@ index 586a0c64373d..8c97c4f16bc9 100644
  #endif // feature xmlstreamreader
  }
  
-@@ -594,22 +604,16 @@ QLatin1StringView QMimeBinaryProvider::iconForMime(CacheFile *cacheFile, int pos
+@@ -594,22 +604,16 @@
      return QLatin1StringView();
  }
  
@@ -387,7 +381,7 @@ index 586a0c64373d..8c97c4f16bc9 100644
  }
  
  ////
-@@ -694,9 +698,9 @@ bool QMimeXMLProvider::isInternalDatabase() const
+@@ -694,9 +698,9 @@
  #endif
  }
  
@@ -399,7 +393,7 @@ index 586a0c64373d..8c97c4f16bc9 100644
  }
  
  void QMimeXMLProvider::addFileNameMatches(const QString &fileName, QMimeGlobMatchResult &result)
-@@ -704,22 +708,17 @@ void QMimeXMLProvider::addFileNameMatches(const QString &fileName, QMimeGlobMatc
+@@ -704,22 +708,17 @@
      m_mimeTypeGlobs.matchingGlobs(fileName, result);
  }
  
@@ -424,7 +418,7 @@ index 586a0c64373d..8c97c4f16bc9 100644
  }
  
  void QMimeXMLProvider::ensureLoaded()
-@@ -749,6 +748,31 @@ void QMimeXMLProvider::ensureLoaded()
+@@ -749,6 +748,31 @@
          load(file);
  }
  
@@ -456,7 +450,7 @@ index 586a0c64373d..8c97c4f16bc9 100644
  void QMimeXMLProvider::load(const QString &fileName)
  {
      QString errorMessage;
-@@ -790,14 +814,11 @@ void QMimeXMLProvider::addGlobPattern(const QMimeGlobPattern &glob)
+@@ -790,14 +814,11 @@
      m_mimeTypeGlobs.addGlob(glob);
  }
  
@@ -475,7 +469,7 @@ index 586a0c64373d..8c97c4f16bc9 100644
  }
  
  /*
-@@ -813,7 +834,7 @@ void QMimeXMLProvider::excludeMimeTypeGlobs(const QStringList &toExclude)
+@@ -813,7 +834,7 @@
      for (const auto &mt : toExclude) {
          auto it = m_nameMimeTypeMap.find(mt);
          if (it != m_nameMimeTypeMap.end())
@@ -484,7 +478,7 @@ index 586a0c64373d..8c97c4f16bc9 100644
          m_mimeTypeGlobs.removeMimeType(mt);
      }
  }
-@@ -853,13 +874,16 @@ void QMimeXMLProvider::addAlias(const QString &alias, const QString &name)
+@@ -853,13 +874,16 @@
  void QMimeXMLProvider::addAllMimeTypes(QList<QMimeType> &result)
  {
      if (result.isEmpty()) { // fast path
@@ -503,11 +497,9 @@ index 586a0c64373d..8c97c4f16bc9 100644
          }
      }
  }
-diff --git a/src/corelib/mimetypes/qmimeprovider_p.h b/src/corelib/mimetypes/qmimeprovider_p.h
-index e498cf8c3992..755737eaafa1 100644
 --- a/src/corelib/mimetypes/qmimeprovider_p.h
 +++ b/src/corelib/mimetypes/qmimeprovider_p.h
-@@ -28,6 +28,7 @@ QT_REQUIRE_CONFIG(mimetype);
+@@ -28,6 +28,7 @@
  QT_BEGIN_NAMESPACE
  
  class QMimeMagicRuleMatcher;
@@ -515,7 +507,7 @@ index e498cf8c3992..755737eaafa1 100644
  
  class QMimeProviderBase
  {
-@@ -39,18 +40,20 @@ public:
+@@ -39,18 +40,20 @@
  
      virtual bool isValid() = 0;
      virtual bool isInternalDatabase() const = 0;
@@ -543,7 +535,7 @@ index e498cf8c3992..755737eaafa1 100644
  
      QString directory() const { return m_directory; }
  
-@@ -60,9 +63,9 @@ public:
+@@ -60,9 +63,9 @@
      /*
          MimeTypes with "glob-deleteall" tags are handled differently by each provider
          sub-class:
@@ -555,7 +547,7 @@ index e498cf8c3992..755737eaafa1 100644
            parsed with QMimeTypeParser
  
          The two lists below are used to let both provider types (XML and Binary) communicate
-@@ -95,16 +98,18 @@ public:
+@@ -95,16 +98,18 @@
  
      bool isValid() override;
      bool isInternalDatabase() const override;
@@ -579,7 +571,7 @@ index e498cf8c3992..755737eaafa1 100644
      void ensureLoaded() override;
      void excludeMimeTypeGlobs(const QStringList &toExclude) override;
  
-@@ -116,8 +121,9 @@ private:
+@@ -116,8 +121,9 @@
      bool matchSuffixTree(QMimeGlobMatchResult &result, CacheFile *cacheFile, int numEntries,
                           int firstOffset, const QString &fileName, qsizetype charPos,
                           bool caseSensitiveCheck);
@@ -590,7 +582,7 @@ index e498cf8c3992..755737eaafa1 100644
      QLatin1StringView iconForMime(CacheFile *cacheFile, int posListOffset, const QByteArray &inputMime);
      void loadMimeTypeList();
      bool checkCacheChanged();
-@@ -128,11 +134,14 @@ private:
+@@ -128,11 +134,14 @@
      bool m_mimetypeListLoaded;
      struct MimeTypeExtra
      {
@@ -607,7 +599,7 @@ index e498cf8c3992..755737eaafa1 100644
  };
  
  /*
-@@ -153,19 +162,24 @@ public:
+@@ -153,19 +162,24 @@
  
      bool isValid() override;
      bool isInternalDatabase() const override;
@@ -635,7 +627,7 @@ index e498cf8c3992..755737eaafa1 100644
      void excludeMimeTypeGlobs(const QStringList &toExclude) override;
      void addGlobPattern(const QMimeGlobPattern &glob);
      void addParent(const QString &child, const QString &parent);
-@@ -176,7 +190,7 @@ private:
+@@ -176,7 +190,7 @@
      void load(const QString &fileName);
      void load(const char *data, qsizetype len);
  
@@ -644,8 +636,6 @@ index e498cf8c3992..755737eaafa1 100644
      NameMimeTypeMap m_nameMimeTypeMap;
  
      typedef QHash<QString, QString> AliasHash;
-diff --git a/src/corelib/mimetypes/qmimetype.cpp b/src/corelib/mimetypes/qmimetype.cpp
-index 94df48c6959e..1563fc564159 100644
 --- a/src/corelib/mimetypes/qmimetype.cpp
 +++ b/src/corelib/mimetypes/qmimetype.cpp
 @@ -6,9 +6,6 @@
@@ -658,7 +648,7 @@ index 94df48c6959e..1563fc564159 100644
  
  #include <QtCore/QDebug>
  #include <QtCore/QLocale>
-@@ -20,33 +17,6 @@ QT_BEGIN_NAMESPACE
+@@ -20,33 +17,6 @@
  
  using namespace Qt::StringLiterals;
  
@@ -692,7 +682,7 @@ index 94df48c6959e..1563fc564159 100644
  /*!
      \class QMimeType
      \inmodule QtCore
-@@ -219,7 +189,7 @@ QString QMimeType::name() const
+@@ -219,7 +189,7 @@
   */
  QString QMimeType::comment() const
  {
@@ -701,7 +691,7 @@ index 94df48c6959e..1563fc564159 100644
  
      QStringList languageList = QLocale().uiLanguages();
      qsizetype defaultIndex = languageList.indexOf(u"en-US"_s);
-@@ -244,13 +214,13 @@ QString QMimeType::comment() const
+@@ -244,13 +214,13 @@
              // uiLanguages() uses '-' as separator, MIME database uses '_'
          const QString lang
              = language == "C"_L1 ? u"en_US"_s : QString(language).replace(u'-', u'_');
@@ -717,7 +707,7 @@ index 94df48c6959e..1563fc564159 100644
              if (!comm.isEmpty())
                  return comm;
          }
-@@ -276,8 +246,8 @@ QString QMimeType::comment() const
+@@ -276,8 +246,8 @@
   */
  QString QMimeType::genericIconName() const
  {
@@ -728,7 +718,7 @@ index 94df48c6959e..1563fc564159 100644
          // From the spec:
          // If the generic icon name is empty (not specified by the mimetype definition)
          // then the mimetype is used to generate the generic icon by using the top-level
-@@ -290,7 +260,7 @@ QString QMimeType::genericIconName() const
+@@ -290,7 +260,7 @@
              groupRef = groupRef.left(slashindex);
          return groupRef + "-x-generic"_L1;
      }
@@ -737,7 +727,7 @@ index 94df48c6959e..1563fc564159 100644
  }
  
  static QString make_default_icon_name_from_mimetype_name(QString iconName)
-@@ -312,11 +282,11 @@ static QString make_default_icon_name_from_mimetype_name(QString iconName)
+@@ -312,11 +282,11 @@
   */
  QString QMimeType::iconName() const
  {
@@ -752,7 +742,7 @@ index 94df48c6959e..1563fc564159 100644
  }
  
  /*!
-@@ -328,8 +298,7 @@ QString QMimeType::iconName() const
+@@ -328,8 +298,7 @@
   */
  QStringList QMimeType::globPatterns() const
  {
@@ -762,7 +752,7 @@ index 94df48c6959e..1563fc564159 100644
  }
  
  /*!
-@@ -426,10 +395,11 @@ QStringList QMimeType::aliases() const
+@@ -423,10 +392,11 @@
   */
  QStringList QMimeType::suffixes() const
  {
@@ -776,7 +766,7 @@ index 94df48c6959e..1563fc564159 100644
          // Not a simple suffix if it looks like: README or *. or *.* or *.JP*G or *.JP?
          if (pattern.startsWith("*."_L1) &&
              pattern.size() > 2 &&
-@@ -469,15 +439,15 @@ QString QMimeType::preferredSuffix() const
+@@ -466,15 +436,15 @@
  */
  QString QMimeType::filterString() const
  {
@@ -796,8 +786,6 @@ index 94df48c6959e..1563fc564159 100644
          }
          filter +=  u')';
      }
-diff --git a/src/corelib/mimetypes/qmimetype_p.h b/src/corelib/mimetypes/qmimetype_p.h
-index 7b5ed77f40a5..b6040098a998 100644
 --- a/src/corelib/mimetypes/qmimetype_p.h
 +++ b/src/corelib/mimetypes/qmimetype_p.h
 @@ -16,13 +16,14 @@
@@ -816,7 +804,7 @@ index 7b5ed77f40a5..b6040098a998 100644
  QT_BEGIN_NAMESPACE
  
  class Q_AUTOTEST_EXPORT QMimeTypePrivate : public QSharedData
-@@ -30,42 +31,12 @@ class Q_AUTOTEST_EXPORT QMimeTypePrivate : public QSharedData
+@@ -30,42 +31,12 @@
  public:
      typedef QHash<QString, QString> LocaleHash;
  
@@ -862,11 +850,9 @@ index 7b5ed77f40a5..b6040098a998 100644
 -
 -#endif   // QMIMETYPE_P_H
 +#endif // QMIMETYPE_P_H
-diff --git a/src/corelib/mimetypes/qmimetypeparser.cpp b/src/corelib/mimetypes/qmimetypeparser.cpp
-index 66cbc32b5c8d..3f1e53b25d11 100644
 --- a/src/corelib/mimetypes/qmimetypeparser.cpp
 +++ b/src/corelib/mimetypes/qmimetypeparser.cpp
-@@ -165,8 +165,7 @@ static CreateMagicMatchRuleResult createMagicMatchRule(const QXmlStreamAttribute
+@@ -165,8 +165,7 @@
  bool QMimeTypeParserBase::parse(QIODevice *dev, const QString &fileName, QString *errorMessage)
  {
  #if QT_CONFIG(xmlstreamreader)
@@ -876,7 +862,7 @@ index 66cbc32b5c8d..3f1e53b25d11 100644
      int priority = 50;
      QStack<QMimeMagicRule *> currentRules; // stack for the nesting of rules
      QList<QMimeMagicRule> rules; // toplevel rules
-@@ -273,7 +272,7 @@ bool QMimeTypeParserBase::parse(QIODevice *dev, const QString &fileName, QString
+@@ -273,7 +272,7 @@
          {
              const auto elementName = reader.name();
              if (elementName == QLatin1StringView(mimeTypeTagC)) {
@@ -885,7 +871,7 @@ index 66cbc32b5c8d..3f1e53b25d11 100644
                      return false;
                  data.clear();
              } else if (elementName == QLatin1StringView(matchTagC)) {
-@@ -314,4 +313,19 @@ bool QMimeTypeParserBase::parse(QIODevice *dev, const QString &fileName, QString
+@@ -314,4 +313,19 @@
  #endif // feature xmlstreamreader
  }
  
@@ -905,8 +891,6 @@ index 66cbc32b5c8d..3f1e53b25d11 100644
 +}
 +
  QT_END_NAMESPACE
-diff --git a/src/corelib/mimetypes/qmimetypeparser_p.h b/src/corelib/mimetypes/qmimetypeparser_p.h
-index c9698e149f89..d4266ffcc039 100644
 --- a/src/corelib/mimetypes/qmimetypeparser_p.h
 +++ b/src/corelib/mimetypes/qmimetypeparser_p.h
 @@ -16,7 +16,7 @@
@@ -918,7 +902,7 @@ index c9698e149f89..d4266ffcc039 100644
  
  QT_REQUIRE_CONFIG(mimetype);
  
-@@ -24,6 +24,21 @@ QT_REQUIRE_CONFIG(mimetype);
+@@ -24,6 +24,21 @@
  
  QT_BEGIN_NAMESPACE
  
@@ -940,7 +924,7 @@ index c9698e149f89..d4266ffcc039 100644
  class QIODevice;
  
  class QMimeTypeParserBase
-@@ -39,7 +54,7 @@ public:
+@@ -39,7 +54,7 @@
      static bool parseNumber(QStringView n, int *target, QString *errorMessage);
  
  protected:
@@ -949,7 +933,7 @@ index c9698e149f89..d4266ffcc039 100644
      virtual bool process(const QMimeGlobPattern &t, QString *errorMessage) = 0;
      virtual void processParent(const QString &child, const QString &parent) = 0;
      virtual void processAlias(const QString &alias, const QString &name) = 0;
-@@ -73,7 +88,7 @@ public:
+@@ -73,7 +88,7 @@
      explicit QMimeTypeParser(QMimeXMLProvider &provider) : m_provider(provider) {}
  
  protected:
@@ -958,9 +942,6 @@ index c9698e149f89..d4266ffcc039 100644
      { m_provider.addMimeType(t); return true; }
  
      inline bool process(const QMimeGlobPattern &glob, QString *) override
-diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/add-extension.xml b/tests/auto/corelib/mimetypes/qmimedatabase/add-extension.xml
-new file mode 100644
-index 000000000000..c4141e0f7072
 --- /dev/null
 +++ b/tests/auto/corelib/mimetypes/qmimedatabase/add-extension.xml
 @@ -0,0 +1,7 @@
@@ -971,45 +952,39 @@ index 000000000000..c4141e0f7072
 +    <comment>JPEG Image</comment>
 +  </mime-type>
 +</mime-info>
-diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/CMakeLists.txt b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/CMakeLists.txt
-index c2642456faf5..e5ad5fd31175 100644
 --- a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/CMakeLists.txt
 +++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/CMakeLists.txt
-@@ -25,6 +25,7 @@ qt_internal_add_test(tst_qmimedatabase-cache
+@@ -23,6 +23,7 @@
+     #"mime/packages/freedesktop.org.xml"
  #)
  set(testdata_resource_files
-     "../circular-inheritance.xml"
 +    "../add-extension.xml"
      "../invalid-magic1.xml"
      "../invalid-magic2.xml"
      "../invalid-magic3.xml"
-diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/CMakeLists.txt b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/CMakeLists.txt
-index b21324aeb4b9..50db02abfeea 100644
 --- a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/CMakeLists.txt
 +++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/CMakeLists.txt
-@@ -25,6 +25,7 @@ qt_internal_add_test(tst_qmimedatabase-xml
+@@ -23,6 +23,7 @@
+     #"mime/packages/freedesktop.org.xml"
  #)
  set(testdata_resource_files
-     "../circular-inheritance.xml"
 +    "../add-extension.xml"
      "../invalid-magic1.xml"
      "../invalid-magic2.xml"
      "../invalid-magic3.xml"
-diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
-index 31c5e701dac1..b1e9f51a25eb 100644
 --- a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
 +++ b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
-@@ -38,6 +38,7 @@ static const std::array additionalGlobalMimeFiles = {
- };
+@@ -31,6 +31,7 @@
+ using namespace Qt::StringLiterals;
  
- static const std::array additionalLocalMimeFiles = {
-+    "add-extension.xml", // adds *.jnewext to image/jpeg
-     "yast2-metapackage-handler-mimetypes.xml",
-     "qml-again.xml",
-     "text-x-objcsrc.xml",
-@@ -1232,6 +1233,11 @@ void tst_QMimeDatabase::installNewLocalMimeType()
-         QCOMPARE(mimes.at(0).name(), u"video/webm");
-     }
+ static const char *const additionalMimeFiles[] = { "yast2-metapackage-handler-mimetypes.xml",
++                                                   "add-extension.xml", // adds *.jnewext to image/jpeg
+                                                    "qml-again.xml",
+                                                    "text-x-objcsrc.xml",
+                                                    "text-plain-subclass.xml",
+@@ -1206,6 +1207,11 @@
+     QCOMPARE(db.mimeTypeForFile(qmlTestFile).name(),
+              QString::fromLatin1("text/x-qml"));
  
 +    // QTBUG-116905: globPatterns() should merge all locations
 +    // add-extension.xml adds *.jnewext
@@ -1019,11 +994,9 @@ index 31c5e701dac1..b1e9f51a25eb 100644
      // Now that we have two directories with mime definitions, check that everything still works
      inheritance();
      if (QTest::currentTestFailed())
-diff --git a/tests/auto/corelib/mimetypes/qmimetype/tst_qmimetype.cpp b/tests/auto/corelib/mimetypes/qmimetype/tst_qmimetype.cpp
-index fda12298fe6a..50183ca4e0b0 100644
 --- a/tests/auto/corelib/mimetypes/qmimetype/tst_qmimetype.cpp
 +++ b/tests/auto/corelib/mimetypes/qmimetype/tst_qmimetype.cpp
-@@ -21,7 +21,6 @@ private slots:
+@@ -21,7 +21,6 @@
      void name();
      void genericIconName();
      void iconName();
@@ -1031,15 +1004,14 @@ index fda12298fe6a..50183ca4e0b0 100644
      void gadget();
  };
  
-@@ -36,52 +35,15 @@ void tst_qmimetype::initTestCase()
+@@ -36,52 +35,15 @@
  
  static QString qMimeTypeName()
  {
 -    static const QString result ("No name of the MIME type");
-+    static const QString result("group/fake-mime");
-     return result;
- }
- 
+-    return result;
+-}
+-
 -static QString qMimeTypeGenericIconName()
 -{
 -    static const QString result ("No file name of an icon image that represents the MIME type");
@@ -1062,15 +1034,16 @@ index fda12298fe6a..50183ca4e0b0 100644
 -static QStringList qMimeTypeGlobPatterns()
 -{
 -    static const QStringList result (buildQMimeTypeFilenameExtensions());
--    return result;
--}
++    static const QString result("group/fake-mime");
+     return result;
+ }
+ 
+ // ------------------------------------------------------------------------------------------------
+ 
+-QMIMETYPE_BUILDER_FROM_RVALUE_REFS
 -
 -// ------------------------------------------------------------------------------------------------
 -
--QMIMETYPE_BUILDER_FROM_RVALUE_REFS
--
- // ------------------------------------------------------------------------------------------------
- 
  void tst_qmimetype::isValid()
  {
 -    QMimeType instantiatedQMimeType (
@@ -1086,7 +1059,7 @@ index fda12298fe6a..50183ca4e0b0 100644
      QVERIFY(instantiatedQMimeType.isValid());
  
      QMimeType otherQMimeType (instantiatedQMimeType);
-@@ -98,23 +60,8 @@ void tst_qmimetype::isValid()
+@@ -98,23 +60,8 @@
  
  void tst_qmimetype::name()
  {
@@ -1112,7 +1085,7 @@ index fda12298fe6a..50183ca4e0b0 100644
  
      // Verify that the Name is part of the equality test:
      QCOMPARE(instantiatedQMimeType.name(), qMimeTypeName());
-@@ -127,63 +74,23 @@ void tst_qmimetype::name()
+@@ -127,63 +74,23 @@
  
  void tst_qmimetype::genericIconName()
  {
@@ -1181,5 +1154,3 @@ index fda12298fe6a..50183ca4e0b0 100644
  
      const QMetaObject *metaObject = &instantiatedQMimeType.staticMetaObject;
  
--- 
-2.16.3


More information about the Neon-commits mailing list