Author: jghali
Date: Fri Feb  4 22:40:01 2022
New Revision: 24902

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24902
Log:
Qt6!: fix overload resolution issue

Modified:
    trunk/Scribus/scribus/scxmlstreamwriter.h
    trunk/Scribus/scribus/undostate.cpp
    trunk/Scribus/scribus/undostate.h

Modified: trunk/Scribus/scribus/scxmlstreamwriter.h
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=24902&path=/trunk/Scribus/scribus/scxmlstreamwriter.h
==============================================================================
--- trunk/Scribus/scribus/scxmlstreamwriter.h   (original)
+++ trunk/Scribus/scribus/scxmlstreamwriter.h   Fri Feb  4 22:40:01 2022
@@ -9,7 +9,6 @@
 
 #include "scribusapi.h"
 
-#include <cstdint>
 #include <QByteArray>
 #include <QString>
 #include <QXmlStreamWriter>
@@ -24,9 +23,9 @@
 
        void writeAttribute(const QString & name, const QString & value) { 
QXmlStreamWriter::writeAttribute(name, value); }
        void writeAttribute(const QString & name, int value)    { 
QXmlStreamWriter::writeAttribute(name, QString::number(value)); }
-       void writeAttribute(const QString & name, int64_t value)    { 
QXmlStreamWriter::writeAttribute(name, QString::number(value)); }
+       void writeAttribute(const QString & name, qint64 value)    { 
QXmlStreamWriter::writeAttribute(name, QString::number(value)); }
        void writeAttribute(const QString & name, uint value)   { 
QXmlStreamWriter::writeAttribute(name, QString::number(value)); }
-       void writeAttribute(const QString & name, uint64_t value)   { 
QXmlStreamWriter::writeAttribute(name, QString::number(value)); }
+       void writeAttribute(const QString & name, quint64 value)   { 
QXmlStreamWriter::writeAttribute(name, QString::number(value)); }
 #ifndef Q_OS_WIN
        void writeAttribute(const QString & name, size_t value)   { 
QXmlStreamWriter::writeAttribute(name, QString::number(value)); }
 #endif

Modified: trunk/Scribus/scribus/undostate.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=24902&path=/trunk/Scribus/scribus/undostate.cpp
==============================================================================
--- trunk/Scribus/scribus/undostate.cpp (original)
+++ trunk/Scribus/scribus/undostate.cpp Fri Feb  4 22:40:01 2022
@@ -139,11 +139,11 @@
        return ret;
 }
 
-int64_t SimpleState::getInt64(const QString& key, int64_t def) const
-{
-       bool ok = false;
-       QVariant retVar = variant(key, QVariant(def));
-       int ret = retVar.toLongLong(&ok);
+qint64 SimpleState::getInt64(const QString& key, qint64 def) const
+{
+       bool ok = false;
+       QVariant retVar = variant(key, QVariant(def));
+       qint64 ret = retVar.toLongLong(&ok);
        if (!ok)
                ret = def;
        return ret;
@@ -159,11 +159,11 @@
        return ret;
 }
 
-uint64_t SimpleState::getUInt64(const QString& key, uint64_t def) const
-{
-       bool ok = false;
-       QVariant retVar = variant(key, QVariant(def));
-       uint64_t ret = retVar.toULongLong(&ok);
+quint64 SimpleState::getUInt64(const QString& key, qulonglong def) const
+{
+       bool ok = false;
+       QVariant retVar = variant(key, QVariant(def));
+       quint64 ret = retVar.toULongLong(&ok);
        if (!ok)
                ret = def;
        return ret;
@@ -209,7 +209,7 @@
        m_values[key] = QVariant(value);
 }
 
-void SimpleState::set(const QString& key, int64_t value)
+void SimpleState::set(const QString& key, qlonglong value)
 {
        m_values[key] = QVariant(value);
 }
@@ -219,7 +219,7 @@
        m_values[key] = QVariant(value);
 }
 
-void SimpleState::set(const QString& key, uint64_t value)
+void SimpleState::set(const QString& key, qulonglong value)
 {
        m_values[key] = QVariant(value);
 }

Modified: trunk/Scribus/scribus/undostate.h
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=24902&path=/trunk/Scribus/scribus/undostate.h
==============================================================================
--- trunk/Scribus/scribus/undostate.h   (original)
+++ trunk/Scribus/scribus/undostate.h   Fri Feb  4 22:40:01 2022
@@ -200,18 +200,18 @@
         * @brief Returns the int value attached to the key.
         *
         * Values are stored as <code>QString</code>s in the map and when 
queried
-        * with this method value attached to the key is converted to an 
int64_t. If
+        * with this method value attached to the key is converted to a 64bit 
integer. If
         * the conversion fails value of the parameter <code>def</code> will be 
returned.
         * If key is not found from the map it will be added there with the
         * value given as a parameter <code>def</code>. In such case 
<code>def</code>
         * will also be returned.
         * @param key Key that is searched from the map
         * @param def Default value to be used if key is not found from the map
-        * @return <code>int64_t</code> value attached to the key in the map. 
If the key is not found
+        * @return <code>qint64</code> value attached to the key in the map. If 
the key is not found
         * from the map it will be added with the value described in the param
         * <code>def</code> which is then returned.
         */
-       int64_t getInt64(const QString& key, int64_t def = 0) const;
+       qint64 getInt64(const QString& key, qint64 def = 0) const;
 
        /**
         * @brief Returns the uint value attached to the key.
@@ -234,18 +234,18 @@
         * @brief Returns the uint64_t value attached to the key.
         *
         * Values are stored as <code>QString</code>s in the map and when 
queried
-        * with this method value attached to the key is converted to an 
uint64_t. If
+        * with this method value attached to the key is converted to a 64bit 
integer. If
         * the conversion fails value of the parameter <code>def</code> will be 
returned.
         * If key is not found from the map it will be added there with the
         * value given as a parameter <code>def</code>. In such case 
<code>def</code>
         * will also be returned.
         * @param key Key that is searched from the map
         * @param def Default value to be used if key is not found from the map
-        * @return <code>uint64_t</code> value attached to the key in the map. 
If the key is not found
+        * @return <code>quint64</code> value attached to the key in the map. 
If the key is not found
         * from the map it will be added with the value described in the param
         * <code>def</code> which is then returned.
         */
-       uint64_t getUInt64(const QString& key, uint64_t def = 0) const;
+       quint64 getUInt64(const QString& key, quint64 def = 0) const;
 
        /**
         * @brief Returns the double value attached to the key.
@@ -321,7 +321,7 @@
         * @param key Key that can be later used to query the value.
         * @param value Value attached to the key.
         */
-       void set(const QString& key, int64_t value);
+       void set(const QString& key, qint64 value);
 
        /**
         * @brief Set a value for the key.
@@ -335,7 +335,7 @@
         * @param key Key that can be later used to query the value.
         * @param value Value attached to the key.
         */
-       void set(const QString& key, uint64_t value);
+       void set(const QString& key, quint64 value);
 
        /**
         * @brief Set a value for the key.


_______________________________________________
scribus-commit mailing list
[email protected]
http://lists.scribus.net/mailman/listinfo/scribus-commit

Reply via email to