Git Product home page Git Product logo

Comments (8)

chryswoods avatar chryswoods commented on June 20, 2024 4

Just found this issue (thanks!) and wanted to add that I solved this in a more C++ way ;-)

I also used this approach for QString::SkipEmptyParts

#include <QtGlobal>
#include <QString>

#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
namespace Qt
{
    static auto endl = ::endl;
    static auto SkipEmptyParts = QString::SkipEmptyParts;
}
#endif

from qarv.

JanWielemaker avatar JanWielemaker commented on June 20, 2024 3

Went for good old macros. After all I'm a C programmer rather than a C++ one 😄

#include <QtGlobal>

#if QT_VERSION >= QT_VERSION_CHECK(5,14,0)
#define ENDL Qt::endl
#else
#define ENDL endl
#endif

from qarv.

exzombie avatar exzombie commented on June 20, 2024

Thanks for the report. I'll take a look soonish. I need to know a bit more, though: you say that you had to move the library. From where to where, exactly?

from qarv.

migraichen avatar migraichen commented on June 20, 2024

hey, i've copied it from the build folder to /usr/local/lib/x86_64-linux-gnu
since this is where aravis moves its library too.
But it probably depends on the distro.
"sudo /sbin/ldconfig -v" should give you the paths and libs that get looked up by the system.

from qarv.

exzombie avatar exzombie commented on June 20, 2024

Well, I've had mixed results.

I've used CMake-provided magic to get proper install paths. However, it will only work properly it you install to /usr by defining -DCMAKE_INSTALL_PREFIX=/usr. Installing to /usr/local, which is the default, will exhibit the same problem as before because CMake and Ubuntu disagree on what is the proper path in this case.

As for the Qt::endl issue, I'm not sure what I can do. The "bare" endl is deprecated since Qt 5.14 or 5.15 (not sure), and we're supposed to use fully-specified Qt::endl. But Ubuntu 20.04 comes with Qt 5.12, which doesn't have that. Using "\n" instead is not a good workaround because we'd need to add Qt::flush as well, and it has the same problem as Qt::endl.

@KlemenBlokar @alajovic @shrx Any ideas?

from qarv.

migraichen avatar migraichen commented on June 20, 2024

Hey, I agree that "\n" is more a quick hack than a solution. For that I'm probably going to update my QT and leave this as a note for other Ubuntu users.
The contradicting about using this on Ubuntu 20.04 is having to install libilmbase12 and libopenexr22 that come from Ubuntu 18.04 and got dropped in 20.04 but the QT version in Ubuntu 20.04 seems to be to old.

from qarv.

exzombie avatar exzombie commented on June 20, 2024

Interesting, I set up a fresh Ubuntu 20.04 container in order to test this, and did not need to install neither libilmbase12 nor libopenexr22. I'm sure this must be specific to your system; if I had to guess, I'd say you have some remnants somewhere that were left after a distribution upgrade. Or perhaps something that you installed manually sometime in the past.

from qarv.

exzombie avatar exzombie commented on June 20, 2024

Ah, to hell with it, let's just use the deprecated endl. I hate looking at warnings, but I guess working software has priority, right? ;)

from qarv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.