Re: [kcoreaddons] src/lib: Revert "Warning--"

2018-04-23 Thread Ivan Čukić
Sorry for the noise, saw that the patch was fixed and committed again. Gah...


Re: [kcoreaddons] src/lib: Revert "Warning--"

2018-04-23 Thread Ivan Čukić
Hi Ben,

Is it possible to have cgit.kde.org show commit hashes in the 'log'
tab (for example [1])?

As for the Laurent's patch, it looks quite sane, so I guess the failed
compilation for other platforms should be investigated further (I've
put Laurent in the TO: field because of this).

Cheers,
Ivan

[1] https://cgit.kde.org/kcoreaddons.git/log/


On Fri, Apr 20, 2018 at 10:49 AM, Ben Cooksley  wrote:
> Git commit bf353edc42fdecf9fda34a024ba7cabcd0efaf68 by Ben Cooksley.
> Committed on 20/04/2018 at 08:47.
> Pushed by bcooksley into branch 'master'.
>
> Revert "Warning--"
>
> The changes in these commits fail on all platforms aside from Linux, breaking 
> the FreeBSD, Android and Windows builds.
>
> CCMAIL: kde-frameworks-devel@kde.org
>
> This reverts commit 6c27d32fd88387a399955e4497eb976bffc0780e.
>
> M  +1-1src/lib/io/kdirwatch.h
> M  +1-1src/lib/jobs/kjobtrackerinterface.h
> M  +0-1src/lib/kaboutdata.cpp
> M  +2-2src/lib/util/kformatprivate.cpp
>
> https://commits.kde.org/kcoreaddons/bf353edc42fdecf9fda34a024ba7cabcd0efaf68
>
> diff --git a/src/lib/io/kdirwatch.h b/src/lib/io/kdirwatch.h
> index d25f2e9..e0de0b6 100644
> --- a/src/lib/io/kdirwatch.h
> +++ b/src/lib/io/kdirwatch.h
> @@ -86,7 +86,7 @@ public:
>   * is added.
>   * @param parent the parent of the QObject (or 0 for parent-less 
> KDataTools)
>   */
> -explicit KDirWatch(QObject *parent = nullptr);
> +KDirWatch(QObject *parent = nullptr);
>
>  /**
>   * Destructor.
> diff --git a/src/lib/jobs/kjobtrackerinterface.h 
> b/src/lib/jobs/kjobtrackerinterface.h
> index 4c76ca9..f47dfc9 100644
> --- a/src/lib/jobs/kjobtrackerinterface.h
> +++ b/src/lib/jobs/kjobtrackerinterface.h
> @@ -41,7 +41,7 @@ public:
>   *
>   * @param parent the parent object
>   */
> -explicit KJobTrackerInterface(QObject *parent = nullptr);
> +KJobTrackerInterface(QObject *parent = nullptr);
>
>  /**
>   * Destroys a KJobTrackerInterface
> diff --git a/src/lib/kaboutdata.cpp b/src/lib/kaboutdata.cpp
> index bf4e505..194becf 100644
> --- a/src/lib/kaboutdata.cpp
> +++ b/src/lib/kaboutdata.cpp
> @@ -286,7 +286,6 @@ QString KAboutLicense::text() const
>  result = d->_licenseText;
>  break;
>  }
> -Q_FALLTHROUGH()
>  // fall through
>  default:
>  result += QCoreApplication::translate(
> diff --git a/src/lib/util/kformatprivate.cpp b/src/lib/util/kformatprivate.cpp
> index 3e11c84..c64917d 100644
> --- a/src/lib/util/kformatprivate.cpp
> +++ b/src/lib/util/kformatprivate.cpp
> @@ -372,7 +372,7 @@ QString KFormatPrivate::formatRelativeDate(const QDate 
> , QLocale::FormatTyp
>  return tr("Invalid date", "used when a relative date string can't be 
> generated because the date is invalid");
>  }
>
> -const qint64 daysTo = QDate::currentDate().daysTo(date);
> +const int daysTo = QDate::currentDate().daysTo(date);
>  if (daysTo > 7 || daysTo < -7) {
>  return m_locale.toString(date, format);
>  }
> @@ -426,7 +426,7 @@ QString KFormatPrivate::formatRelativeDate(const QDate 
> , QLocale::FormatTyp
>
>  QString KFormatPrivate::formatRelativeDateTime(const QDateTime , 
> QLocale::FormatType format) const
>  {
> -const qint64 daysTo = QDate::currentDate().daysTo(dateTime.date());
> +int daysTo = QDate::currentDate().daysTo(dateTime.date());
>  if (daysTo > 7 || daysTo < -7) {
>  return m_locale.toString(dateTime, format);
>  }



-- 
KDE, ivan.cu...@kde.org, http://cukic.co/
gpg key fingerprint: 292F 9B5C 5A1B 2A2F 9CF3  45DF C9C5 77AF 0A37 240A


[kcoreaddons] src/lib: Revert "Warning--"

2018-04-20 Thread Ben Cooksley
Git commit bf353edc42fdecf9fda34a024ba7cabcd0efaf68 by Ben Cooksley.
Committed on 20/04/2018 at 08:47.
Pushed by bcooksley into branch 'master'.

Revert "Warning--"

The changes in these commits fail on all platforms aside from Linux, breaking 
the FreeBSD, Android and Windows builds.

CCMAIL: kde-frameworks-devel@kde.org

This reverts commit 6c27d32fd88387a399955e4497eb976bffc0780e.

M  +1-1src/lib/io/kdirwatch.h
M  +1-1src/lib/jobs/kjobtrackerinterface.h
M  +0-1src/lib/kaboutdata.cpp
M  +2-2src/lib/util/kformatprivate.cpp

https://commits.kde.org/kcoreaddons/bf353edc42fdecf9fda34a024ba7cabcd0efaf68

diff --git a/src/lib/io/kdirwatch.h b/src/lib/io/kdirwatch.h
index d25f2e9..e0de0b6 100644
--- a/src/lib/io/kdirwatch.h
+++ b/src/lib/io/kdirwatch.h
@@ -86,7 +86,7 @@ public:
  * is added.
  * @param parent the parent of the QObject (or 0 for parent-less 
KDataTools)
  */
-explicit KDirWatch(QObject *parent = nullptr);
+KDirWatch(QObject *parent = nullptr);
 
 /**
  * Destructor.
diff --git a/src/lib/jobs/kjobtrackerinterface.h 
b/src/lib/jobs/kjobtrackerinterface.h
index 4c76ca9..f47dfc9 100644
--- a/src/lib/jobs/kjobtrackerinterface.h
+++ b/src/lib/jobs/kjobtrackerinterface.h
@@ -41,7 +41,7 @@ public:
  *
  * @param parent the parent object
  */
-explicit KJobTrackerInterface(QObject *parent = nullptr);
+KJobTrackerInterface(QObject *parent = nullptr);
 
 /**
  * Destroys a KJobTrackerInterface
diff --git a/src/lib/kaboutdata.cpp b/src/lib/kaboutdata.cpp
index bf4e505..194becf 100644
--- a/src/lib/kaboutdata.cpp
+++ b/src/lib/kaboutdata.cpp
@@ -286,7 +286,6 @@ QString KAboutLicense::text() const
 result = d->_licenseText;
 break;
 }
-Q_FALLTHROUGH()
 // fall through
 default:
 result += QCoreApplication::translate(
diff --git a/src/lib/util/kformatprivate.cpp b/src/lib/util/kformatprivate.cpp
index 3e11c84..c64917d 100644
--- a/src/lib/util/kformatprivate.cpp
+++ b/src/lib/util/kformatprivate.cpp
@@ -372,7 +372,7 @@ QString KFormatPrivate::formatRelativeDate(const QDate 
, QLocale::FormatTyp
 return tr("Invalid date", "used when a relative date string can't be 
generated because the date is invalid");
 }
 
-const qint64 daysTo = QDate::currentDate().daysTo(date);
+const int daysTo = QDate::currentDate().daysTo(date);
 if (daysTo > 7 || daysTo < -7) {
 return m_locale.toString(date, format);
 }
@@ -426,7 +426,7 @@ QString KFormatPrivate::formatRelativeDate(const QDate 
, QLocale::FormatTyp
 
 QString KFormatPrivate::formatRelativeDateTime(const QDateTime , 
QLocale::FormatType format) const
 {
-const qint64 daysTo = QDate::currentDate().daysTo(dateTime.date());
+int daysTo = QDate::currentDate().daysTo(dateTime.date());
 if (daysTo > 7 || daysTo < -7) {
 return m_locale.toString(dateTime, format);
 }