Re: [Interest] equivalent of python glob

2019-08-26 Thread Jérôme Godbout
I always use '/' for my path, I use to native path only when doing command or 
when needed. I also have toWindowsPath toUnixPath functions when doing cross 
platform request (non native call). The cleanPath() could be useful indeed, but 
if i remeber well I had some special edge case I wanted to cover. Anyway my 
unit test seem to indicate this work properly. If you come with a better 
solution, I could try it, I did not spend too much time on this.


From: Interest  on behalf of Hamish Moffatt 

Sent: Monday, August 26, 2019 7:59 PM
To: interest@qt-project.org 
Subject: Re: [Interest] equivalent of python glob

On 27/8/19 12:33 am, Jérôme Godbout wrote:
> This is what I did for pathJoin
>
> const QString SEPARATOR("/");
> QString FileSystemUtil::pathJoin(const QStringList& paths)


Thanks. You could do that simpler with QDir::cleanPath() and
QDir::toNativeSeparators() I think (and not have to hardcode the separator).


I got my glob working with a mix of QDir, QFileInfo and QDirIterator. I
think it's a shame there isn't something simpler built in to C++ or Qt
though.


Hamish

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] equivalent of python glob

2019-08-26 Thread Hamish Moffatt

On 27/8/19 12:33 am, Jérôme Godbout wrote:

This is what I did for pathJoin

const QString SEPARATOR("/");
QString FileSystemUtil::pathJoin(const QStringList& paths)



Thanks. You could do that simpler with QDir::cleanPath() and 
QDir::toNativeSeparators() I think (and not have to hardcode the separator).



I got my glob working with a mix of QDir, QFileInfo and QDirIterator. I 
think it's a shame there isn't something simpler built in to C++ or Qt 
though.



Hamish

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Q_NAMESPACE is not portable?

2019-08-26 Thread Jason H

That's what I was attempting to point out. 

I think "for instance" should be written out in this case, or use an established abbreviation, or dropped entirely:

 


"This is useful if the object needs to be exported from a dynamic library."

"This is useful for intance, if the object needs to be exported from a dynamic library." (comma placement?)

"This is useful, e.g. if the object needs to be exported from a dynamic library." (comma placement?)

 

But I have never seen f.i. used anywhere in documentation.  It took me several seconds to figure out what it was...

 

 

Sent: Monday, August 26, 2019 at 12:14 PM
From: "Andy" 
To: "Giuseppe D'Angelo" 
Cc: "Jason H" , "Qt Project" 
Subject: Re: [Interest] Q_NAMESPACE is not portable?




Not trying to start a "thing", but I am curious where "f.i." comes from. Is this a new thing?

 

I've honestly never seen it before.

 









---
Andy Maloney  //  https://asmaloney.com

twitter ~ @asmaloney










 


On Mon, Aug 26, 2019 at 12:07 PM Giuseppe D'Angelo via Interest  wrote:

On 26/08/2019 18:04, Jason H wrote:
> "This is useful f.i. if the object needs to be exported from a dynamic library."
> what's "f.i."? "For instance"? Isn't that "e.g." (but definitely not i.e.)

"For instance" / "for example" are precisly the English translations of
exempli grati-a...

Cheers,
--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest





___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Static build of Qt - debug mode and plugins

2019-08-26 Thread Jakub Narolewski
Correct! Somewhat. I’m using VS under Windows configured to use ‘Unix 
Makefiles’ as generator when I’m connected to remote Linux boxes.
Under Windows I use Ninja.

Narolewski Jakub

From: Elvis Stansvik
Sent: 26 August 2019 18:54
To: Matthew Woehlke
Cc: interest@qt-project.org Interest; Jakub Narolewski
Subject: Re: Static build of Qt - debug mode and plugins

Den mån 26 aug. 2019 kl 18:49 skrev Matthew Woehlke :
>
> On 26/08/2019 12.18, Elvis Stansvik wrote:
> > Den mån 26 aug. 2019 17:32Matthew Woehlke skrev:
> >> ...or just run `make VERBOSE=1`.
> >
> > I didn't know if he was using ninja or make, so suggested the solution that
> > I believe will work with both (with recent versions of CMake) :)
>
> Fair point. I'm pretty sure the `[1%] ...` is not Ninja (Ninja would
> normally be e.g. `[1/52] ...`), but it might have been Visual Studio.

Ah yes, well spotted. It wasn't VS since it's Linux. So your Make
assumption was probably correct.

>
> For some reason I took one look and immediately believed it to be
> `make`, but now I think that was my bad :-). (Possibly related to how
> often I use Windows these days... hardly ever. Also, when I do have to
> use Windows, I still use Ninja ;-).)

Amen.

Elvis

>
> --
> Matthew

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Static build of Qt - debug mode and plugins

2019-08-26 Thread Elvis Stansvik
Den mån 26 aug. 2019 kl 18:49 skrev Matthew Woehlke :
>
> On 26/08/2019 12.18, Elvis Stansvik wrote:
> > Den mån 26 aug. 2019 17:32Matthew Woehlke skrev:
> >> ...or just run `make VERBOSE=1`.
> >
> > I didn't know if he was using ninja or make, so suggested the solution that
> > I believe will work with both (with recent versions of CMake) :)
>
> Fair point. I'm pretty sure the `[1%] ...` is not Ninja (Ninja would
> normally be e.g. `[1/52] ...`), but it might have been Visual Studio.

Ah yes, well spotted. It wasn't VS since it's Linux. So your Make
assumption was probably correct.

>
> For some reason I took one look and immediately believed it to be
> `make`, but now I think that was my bad :-). (Possibly related to how
> often I use Windows these days... hardly ever. Also, when I do have to
> use Windows, I still use Ninja ;-).)

Amen.

Elvis

>
> --
> Matthew
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Static build of Qt - debug mode and plugins

2019-08-26 Thread Matthew Woehlke
On 26/08/2019 12.18, Elvis Stansvik wrote:
> Den mån 26 aug. 2019 17:32Matthew Woehlke skrev:
>> ...or just run `make VERBOSE=1`.
> 
> I didn't know if he was using ninja or make, so suggested the solution that
> I believe will work with both (with recent versions of CMake) :)

Fair point. I'm pretty sure the `[1%] ...` is not Ninja (Ninja would
normally be e.g. `[1/52] ...`), but it might have been Visual Studio.

For some reason I took one look and immediately believed it to be
`make`, but now I think that was my bad :-). (Possibly related to how
often I use Windows these days... hardly ever. Also, when I do have to
use Windows, I still use Ninja ;-).)

-- 
Matthew
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Q_NAMESPACE is not portable?

2019-08-26 Thread Matthew Woehlke
On 26/08/2019 11.56, Giuseppe D'Angelo wrote:
> On 26/08/2019 17:29, Matthew Woehlke wrote:
>> BTW, what happened to the doc? Macros aren't class members...
> 
> I'm thinking it's still https://bugreports.qt.io/browse/QTBUG-76822

Could be.

>> (Relatedly, any word on lifting the implied  dependency on
>> several of these?)
> 
> I agree in principle at moving these macros elsewhere, didn't *you* push
> a patch that got stuck just because of documentation issues? :-)

Yes (https://codereview.qt-project.org/c/qt/qtbase/+/265168). I would
like to see it un-stuck :-).

-- 
Matthew
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Static build of Qt - debug mode and plugins

2019-08-26 Thread Elvis Stansvik
Den mån 26 aug. 2019 17:32Matthew Woehlke  skrev:

> On 25/08/2019 03.09, Elvis Stansvik wrote:
> > Den sön 25 aug. 2019 kl 02:56 skrev Thiago Macieira:
> >> On Saturday, 24 August 2019 10:53:45 PDT Jakub Narolewski wrote:
> >>> [  1%] Linking CXX executable mrserver_debug
> >>
> >> Please expand this line.
> >
> > Jakub, to do this you can pass -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE to
> CMake.
>
> ...or just run `make VERBOSE=1`.
>
> Or, better yet, install Ninja and use `-G Ninja` when running CMake ;-).
> (And then `ninja -v`.) Your build times will thank you.
>

I didn't know if he was using ninja or make, so suggested the solution that
I believe will work with both (with recent versions of CMake) :)

(I could have dreamed up that it also works with ninja though.. It may have
just been a suggestion.)

Elvis


> --
> Matthew
>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Q_NAMESPACE is not portable?

2019-08-26 Thread Andy
Not trying to start a "thing", but I am curious where "f.i." comes from. Is
this a new thing?

I've honestly never seen it before.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney 



On Mon, Aug 26, 2019 at 12:07 PM Giuseppe D'Angelo via Interest <
interest@qt-project.org> wrote:

> On 26/08/2019 18:04, Jason H wrote:
> > "This is useful f.i. if the object needs to be exported from a dynamic
> library."
> > what's "f.i."? "For instance"? Isn't that "e.g." (but definitely not
> i.e.)
>
> "For instance" / "for example" are precisly the English translations of
> exempli grati-a...
>
> Cheers,
> --
> Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
> KDAB (France) S.A.S., a KDAB Group company
> Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
> KDAB - The Qt, C++ and OpenGL Experts
>
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Q_NAMESPACE is not portable?

2019-08-26 Thread Giuseppe D'Angelo via Interest

On 26/08/2019 18:04, Jason H wrote:

"This is useful f.i. if the object needs to be exported from a dynamic library."
what's "f.i."? "For instance"? Isn't that "e.g." (but definitely not i.e.)


"For instance" / "for example" are precisly the English translations of 
exempli grati-a...


Cheers,
--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Q_NAMESPACE is not portable?

2019-08-26 Thread Jason H


> Sent: Friday, August 23, 2019 at 7:02 PM
> From: "Giuseppe D'Angelo via Interest" 
> To: interest@qt-project.org
> Subject: Re: [Interest] Q_NAMESPACE is not portable?
>
> On 24/08/2019 00:10, Matthew Woehlke wrote:
> > Am I doing something wrong, or is it impossible to use Q_NAMESPACE
> > correctly without platform-specific PP conditionals?
>
> I've fixed this in 5.14, see
>
> > https://doc-snapshots.qt.io/qt5-dev/qobject.html#Q_NAMESPACE_EXPORT

"This is useful f.i. if the object needs to be exported from a dynamic library."
what's "f.i."? "For instance"? Isn't that "e.g." (but definitely not i.e.)


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Q_NAMESPACE is not portable?

2019-08-26 Thread Giuseppe D'Angelo via Interest

On 26/08/2019 17:29, Matthew Woehlke wrote:

Okay... that's both good and bad news... good that it's fixed, bad that
it isn't available in a released version.

BTW, what happened to the doc? Macros aren't class members...


I'm thinking it's still


https://bugreports.qt.io/browse/QTBUG-76822



(Relatedly, any word on lifting the implied  dependency on
several of these?)


I agree in principle at moving these macros elsewhere, didn't *you* push 
a patch that got stuck just because of documentation issues? :-)


Thanks,
--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts



smime.p7s
Description: S/MIME Cryptographic Signature
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Static build of Qt - debug mode and plugins

2019-08-26 Thread Narolewski Jakub
Although all these examples look nice the CMAKE_VERBOSE_MAKEFILE is good
enough for me as I currently develop my software remotely using VS Studio
and it's remote CMake integration. I just modify CMakeSettings.json and
there comes more stuff to read :)

On Mon, 26 Aug 2019, 17:32 Matthew Woehlke, 
wrote:

> On 25/08/2019 03.09, Elvis Stansvik wrote:
> > Den sön 25 aug. 2019 kl 02:56 skrev Thiago Macieira:
> >> On Saturday, 24 August 2019 10:53:45 PDT Jakub Narolewski wrote:
> >>> [  1%] Linking CXX executable mrserver_debug
> >>
> >> Please expand this line.
> >
> > Jakub, to do this you can pass -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE to
> CMake.
>
> ...or just run `make VERBOSE=1`.
>
> Or, better yet, install Ninja and use `-G Ninja` when running CMake ;-).
> (And then `ninja -v`.) Your build times will thank you.
>
> --
> Matthew
>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Q_NAMESPACE is not portable?

2019-08-26 Thread Allan Sandfeld Jensen
On Monday, 26 August 2019 17:29:31 CEST Matthew Woehlke wrote:
> On 23/08/2019 19.02, Giuseppe D'Angelo via Interest wrote:
> > On 24/08/2019 00:10, Matthew Woehlke wrote:
> >> Am I doing something wrong, or is it impossible to use Q_NAMESPACE
> >> correctly without platform-specific PP conditionals?
> > 
> > I've fixed this in 5.14, see
> > 
> >> https://doc-snapshots.qt.io/qt5-dev/qobject.html#Q_NAMESPACE_EXPORT
> 
> BTW, what happened to the doc? Macros aren't class members...

LOL. 
It is broken in 5.13 too
https://doc-snapshots.qt.io/qt5-5.13/qobject.html#Q_NAMESPACE

looks right 5.12
https://doc-snapshots.qt.io/qt5-5.12/qobject.html#Q_NAMESPACE


___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Static build of Qt - debug mode and plugins

2019-08-26 Thread Matthew Woehlke
On 25/08/2019 03.09, Elvis Stansvik wrote:
> Den sön 25 aug. 2019 kl 02:56 skrev Thiago Macieira:
>> On Saturday, 24 August 2019 10:53:45 PDT Jakub Narolewski wrote:
>>> [  1%] Linking CXX executable mrserver_debug
>>
>> Please expand this line.
> 
> Jakub, to do this you can pass -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE to CMake.

...or just run `make VERBOSE=1`.

Or, better yet, install Ninja and use `-G Ninja` when running CMake ;-).
(And then `ninja -v`.) Your build times will thank you.

-- 
Matthew
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Q_NAMESPACE is not portable?

2019-08-26 Thread Matthew Woehlke
On 23/08/2019 19.02, Giuseppe D'Angelo via Interest wrote:
> On 24/08/2019 00:10, Matthew Woehlke wrote:
>> Am I doing something wrong, or is it impossible to use Q_NAMESPACE
>> correctly without platform-specific PP conditionals?
> 
> I've fixed this in 5.14, see
> 
>> https://doc-snapshots.qt.io/qt5-dev/qobject.html#Q_NAMESPACE_EXPORT

Okay... that's both good and bad news... good that it's fixed, bad that
it isn't available in a released version.

BTW, what happened to the doc? Macros aren't class members...

(Relatedly, any word on lifting the implied  dependency on
several of these?)

-- 
Matthew
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] equivalent of python glob

2019-08-26 Thread Jérôme Godbout
This is what I did for pathJoin

const QString SEPARATOR("/");
QString FileSystemUtil::pathJoin(const QStringList& paths)
{
QString rv;
for(const QString& s : paths)
{
if(!rv.isEmpty() && !rv.endsWith(SEPARATOR))
{
rv += SEPARATOR;
}
if(!rv.isEmpty() && s.startsWith(SEPARATOR))
{
rv += s.right(s.size() - SEPARATOR.size());
}
else
{
rv += s;
}
}
return rv;
}

-Original Message-
From: Interest  On Behalf Of Thiago Macieira
Sent: August 26, 2019 1:37 AM
To: interest@qt-project.org
Subject: Re: [Interest] equivalent of python glob

On Sunday, 25 August 2019 16:34:03 PDT Hamish Moffatt wrote:
> On a related note, where is the equivalent of os.path.join()?

String concatenation. You don't need a function to do it for you.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Static build of Qt - debug mode and plugins

2019-08-26 Thread Alexandru Croitor
Thanks again for starting it : )

> On 26. Aug 2019, at 16:01, Kyle Edwards  wrote:
> 
> On Sun, 2019-08-25 at 18:07 +, Alexandru Croitor wrote:
>> Note that Qt 5.14 will come with support for importing static plugins
>> from CMake, and you won't have to bother with the dependency order
>> anymore.
> 
> Thanks again for finishing that off for me!
> 
> Kyle

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Static build of Qt - debug mode and plugins

2019-08-26 Thread Kyle Edwards via Interest
On Sun, 2019-08-25 at 18:07 +, Alexandru Croitor wrote:
> Note that Qt 5.14 will come with support for importing static plugins
> from CMake, and you won't have to bother with the dependency order
> anymore.

Thanks again for finishing that off for me!

Kyle
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Static build of Qt - debug mode and plugins

2019-08-26 Thread Roland Hughes


On 8/26/19 5:00 AM, Thiago Macieira wrote:

It's also interesting that QtCore and QtNetwork are listed three times.
Multiple inclusions has been happening for a long time. I butted heads 
with that when creating that "Explore this computer" app which had to 
install on Ubuntu 12, 13, 14, and 15 both 32-bit and 64-bit for single 
executable. Fun times there. Static build wasn't an option either thanks 
to the Qt Web stuff.


--
Roland Hughes, President
Logikal Solutions
(630)-205-1593  (cell)
http://www.theminimumyouneedtoknow.com
http://www.infiniteexposure.net
http://www.johnsmith-book.com

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest