Re: [Qgis-user] Error compiling QGIS 2.18.8: "QStringLiteral was not declared in this scope"

2017-05-25 Thread Hernán De Angelis
Thanks Jürgen and Larry for your fast responses!

Now I sit here trying to get this to work in my machine. Downloaded the
latest master from GitHub and see that now it can only accept qt5 and py3.
QGIS is moving fast!

Cheers and thanks again!

/Hernán


On Thu, May 25, 2017 at 8:34 AM, Jürgen E. Fischer  wrote:

> Hi Larry,
>
> On Wed, 24. May 2017 at 15:33:00 -0600, Larry Shaffer wrote:
> > Side note: I have gotten around it for C++ plugin development, where I
> > wanted to compile the same plugin code for QGIS 2 and 3 while focusing
> more
> > on QGIS 3 coding style/standards, by using the following macro:
>
> That is also in recent versions of qca.  So this bug only unfolded on
> platforms
> that had older versions (jessie/trusty) - which initially was a bit
> puzzling.
>
>
> Jürgen
>
> --
> Jürgen E. Fischer   norBIT GmbH Tel.
> +49-4931-918175-31
> Dipl.-Inf. (FH) Rheinstraße 13  Fax.
> +49-4931-918175-50
> Software Engineer   D-26506 Norden
> http://www.norbit.de
> QGIS release manager (PSC)  GermanyIRC: jef on FreeNode
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Error compiling QGIS 2.18.8: "QStringLiteral was not declared in this scope"

2017-05-25 Thread Jürgen E . Fischer
Hi Larry,

On Wed, 24. May 2017 at 15:33:00 -0600, Larry Shaffer wrote:
> Side note: I have gotten around it for C++ plugin development, where I
> wanted to compile the same plugin code for QGIS 2 and 3 while focusing more
> on QGIS 3 coding style/standards, by using the following macro:

That is also in recent versions of qca.  So this bug only unfolded on platforms
that had older versions (jessie/trusty) - which initially was a bit puzzling.


Jürgen

-- 
Jürgen E. Fischer   norBIT GmbH Tel. +49-4931-918175-31
Dipl.-Inf. (FH) Rheinstraße 13  Fax. +49-4931-918175-50
Software Engineer   D-26506 Norden http://www.norbit.de
QGIS release manager (PSC)  GermanyIRC: jef on FreeNode


signature.asc
Description: PGP signature
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Error compiling QGIS 2.18.8: "QStringLiteral was not declared in this scope"

2017-05-24 Thread Larry Shaffer
Hi Hernán,

It looks like someone backported a fix from QGIS 2.99 (upcoming 3.0
release) code branch, where QStringLiteral() is preferred over QString()
because it is available in Qt5, and other reasons. The use of
QStringLiteral in 2.x code bases needs removed (as Jürgen mentioned).

Side note: I have gotten around it for C++ plugin development, where I
wanted to compile the same plugin code for QGIS 2 and 3 while focusing more
on QGIS 3 coding style/standards, by using the following macro:

#ifndef QStringLiteral
// Add define for Qt4
// Source code is assumed to be encoded in UTF-8 (as per Qt5 macro)
//# define QStringLiteral(str) QString::fromUtf8(str, sizeof(str) - 1)
// But... that macro does not appear to work on Linux with GCC,
// Just add QString() stub instead
# define QStringLiteral(str) QString(str)
#endif

This *could* be added to 2.x branches (to guard against this type of
error), but there is the problem that there is no standard base included
header file, e.g. qgis.h and qgsconfig.h are not always included. So, no
clear place to put the macro.

Regards,

Larry Shaffer
Dakota Cartography
Black Hills, South Dakota
--
Boundless Desktop and QGIS Support/Development
Boundless Spatial - http://boundlessgeo.com
lshaf...@boundlessgeo.com


Larry Shaffer
Dakota Cartography
Black Hills, South Dakota
--
Boundless Desktop and QGIS Support/Development
Boundless Spatial - http://boundlessgeo.com
lshaf...@boundlessgeo.com

On Wed, May 24, 2017 at 3:21 PM, Jürgen E. Fischer  wrote:

> Hi Hernán,
>
> On Wed, 24. May 2017 at 22:56:49 +0200, Hernán De Angelis wrote:
> > I am trying to compile 2.18.8 from source. This is my usual way of
> > installing QGIS and I never experience any dramatic problems. However,
> this
> > time I keep getting the following cryptic error, which I cannot seem to
> get
> > around:
>
> Apply af8fb04f.
>
>
> Jürgen
>
>
> --
> Jürgen E. Fischer   norBIT GmbH Tel.
> +49-4931-918175-31
> Dipl.-Inf. (FH) Rheinstraße 13  Fax.
> +49-4931-918175-50
> Software Engineer   D-26506 Norden
> http://www.norbit.de
> QGIS release manager (PSC)  GermanyIRC: jef on FreeNode
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Error compiling QGIS 2.18.8: "QStringLiteral was not declared in this scope"

2017-05-24 Thread Jürgen E . Fischer
Hi Hernán,

On Wed, 24. May 2017 at 22:56:49 +0200, Hernán De Angelis wrote:
> I am trying to compile 2.18.8 from source. This is my usual way of
> installing QGIS and I never experience any dramatic problems. However, this
> time I keep getting the following cryptic error, which I cannot seem to get
> around:

Apply af8fb04f.


Jürgen


-- 
Jürgen E. Fischer   norBIT GmbH Tel. +49-4931-918175-31
Dipl.-Inf. (FH) Rheinstraße 13  Fax. +49-4931-918175-50
Software Engineer   D-26506 Norden http://www.norbit.de
QGIS release manager (PSC)  GermanyIRC: jef on FreeNode


signature.asc
Description: PGP signature
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user