Re: [Interest] Qt6 build on Raspi

2024-03-26 Thread Hamish Moffatt via Interest
Hi Alexander,

All the modules are available - see in 
https://archive.raspbian.org/raspbian/pool/main/q/

Hamish

Sent from Nine<http://www.9folders.com/>

From: Alexander Carôt 
Sent: Monday, March 25, 2024 16:06
To: Hamish Moffatt
Cc: interest@qt-project.org
Subject: Aw: Re: [Interest] Qt6 build on Raspi

Hi Hamish,

>>> https://archive.raspbian.org/raspbian/pool/main/q/qt6-base

I will give it a try but before I start I wonder if the following modules are 
also available because I can't spot them on the directory:

websockets
webengine
multimedia
multimediawidgets

Thanks for letting me know,
best

Alex

--
http://www.carot.de
Email : alexan...@carot.de
Tel.: +49 (0)177 5719797


> Gesendet: Sonntag, 10. März 2024 um 08:25 Uhr
> Von: "Hamish Moffatt via Interest" 
> An: interest@qt-project.org
> Betreff: Re: [Interest] Qt6 build on Raspi
>
> On 9/3/24 20:57, Alexander Carôt via Interest wrote:
> >>>> ... or build on a system with sufficient RAM.
> > I see – can I use any ARM based machine in order to work on a Raspi4 or are 
> > there specific requirements ?
> >
> > Furthermore, I might have missed something but are there probably pre-built 
> > Qt6 binaries for Raspi available ?
> >
> It's in Debian 12 (bookworm) and Raspbian bookworm.
> https://archive.raspbian.org/raspbian/pool/main/q/qt6-base/
>
> That's the open source edition. If you need commercial then I think you
> have to build it yourself on another armhf system.
>
>
> 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] Qt6 build on Raspi

2024-03-09 Thread Hamish Moffatt via Interest

On 9/3/24 20:57, Alexander Carôt via Interest wrote:

... or build on a system with sufficient RAM.

I see – can I use any ARM based machine in order to work on a Raspi4 or are 
there specific requirements ?

Furthermore, I might have missed something but are there probably pre-built Qt6 
binaries for Raspi available ?

It's in Debian 12 (bookworm) and Raspbian bookworm. 
https://archive.raspbian.org/raspbian/pool/main/q/qt6-base/


That's the open source edition. If you need commercial then I think you 
have to build it yourself on another armhf system.



Hamish

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


Re: [Interest] [Qt bugreports] Updates for QTBUG-122109: QTreeWidget's columns do not seem to resize properly after upgrading from Qt6.5.3 to Qt6.1.1

2024-03-05 Thread Hamish Moffatt via Interest


On 6/3/24 17:40, Jani Heikkinen via Interest wrote:


Hi!

Yeah, no snapshot or release yet having this fix. The fix will be in 
Qt 6.7.0 RC, which should be released soon, most probably at the 
beginning of next week




Jira says it is fixed in 6.5.5, which isn't correct.

Hamish

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


Re: [Interest] Modeless dialog issue on Mac

2023-11-15 Thread Hamish Moffatt via Interest

On 15/11/23 21:01, Calogero Mauceri wrote:
The problem of using Qt::WindowStaysOnTopHint is that the dialog stays 
on top of any desktop application while it has to be on top of the 
application level only. Here is what I mean



We grappled with this too. It actually worked well in earlier versions 
of Qt (a long time ago).


We worked around it by watching for application state change events and 
dynamically removing the WindowStaysOnTop flag when the application 
loses focus.



Tor writes that this is normal behaviour on macOS, but it's not 
consistent with other Qt platforms.




Hamish

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


Re: [Interest] QEvent::Quit vs. QEvent::Close

2023-10-23 Thread Hamish Moffatt via Interest

On 24/10/23 06:10, Alexander Dyagilev wrote:
I would prefer for an additional event to be used when the user 
triggers Quit. E.g. something like QEvent::QuitByUser.


For now, it seems I will have to involve some additional ugly logics 
(something like setting a global variable) More code more 
complexity for such a simple situation. Not good, IMO. 



Does QEvent::spontaneous() tell you anything about the two different 
quit events?


Hamish

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


Re: [Interest] Qt Installer Framework - add menu entries under Linux

2023-09-12 Thread Hamish Moffatt via Interest

On 9/9/23 19:14, Petric Frank wrote:

Hello,

there is an example to add start menu entries for the windows platform.

But how to do it for the Linux platform - here: Debian 12 (Bookworm) ?

Platform: Debian 12
WM: KDE Plasma
Qt 5.15.2 (by Online Installer from qt.io)



You need to create a .desktop file in the right place.


https://wiki.archlinux.org/title/Desktop_entries

https://specifications.freedesktop.org/desktop-entry-spec/latest/



Hamish

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


Re: [Interest] slower compilation with Qt6

2023-07-24 Thread Hamish Moffatt via Interest

On 24/7/23 17:01, Cristian Adam wrote:
The compilation time degradation is being tracked at [QTBUG-97601] 
Compilation speed decrease with Qt 6.2 compared to Qt 5.15.2 - Qt Bug 
Tracker 


For Qt Creator I use https://ccache.dev/ (yes, it works with MSVC) so 
that even if it takes longer to compile, I won't be compiling the same 
file in same situation twice.



Thanks, good to know this a known issue with work in progress. I do use 
ccache on my linux builds, though I'm finding it increasingly unreliable 
with PCH enabled so I will have to decide which is more useful.



My test compile results for 5.15.13 versus 6.5.2 are even worse than the 
figures you reported in that issue.



For a project with ~600 TUs, compiled on linux with clang 14, PCH on but 
no ccache, I see 40 seconds -> 96 seconds.



For another project with ~900 TUs, compiled with MSVC 2022 with jom, PCH 
on but no ccache, I see 178 seconds -> 332.




I compile with CONFIG += c++2a on both Qt versions.


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


[Interest] slower compilation with Qt6

2023-07-23 Thread Hamish Moffatt via Interest
I've just finished porting my application from Qt 5.15 to 6.5, and I'm 
finding that compilation is significantly slower now - builds take twice 
as long or more. For example a linux-g++ build of a project with ~650 .o 
files has gone from 45 seconds to 100. I see similar increases on 
Windows with MSVC2022, and in other projects with more compilation units.


I'm already using precompiled headers, including a bunch of Qt headers 
and some STL.


The next MSVC2022 preview release has a "Build Insights" feature which 
shows time spent processing header files, and my biggest culprits are 
some headers of mine that use a lot of Q_GADGET and Q_PROPERTY macros.



Does anyone have any suggestions on how to speed things up? I see some 
other comments about this online for example 
https://forum.qt.io/topic/142309/compilation-times-with-qt6/12




Thanks

Hamish



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


Re: [Interest] unresolved WinMain on porting to Qt 6

2023-06-25 Thread Hamish Moffatt via Interest

On 23/6/23 22:16, Henry Skoglund wrote:

On 2023-06-23 07:15, Hamish Moffatt via Interest wrote:


If I add the linker flag /ENTRY:mainCRTStartup then it builds. What's 
the correct Qt solution for this though?




The fact that adding /ENTRY:mainCRTStartup helped implies that you're 
linking with /SUBSYSTEM:CONSOLE and not /SUBSYSTEM:WINDOWS, i.e. 
defaulting to console flavor.
Maybe you forgot "QT += widgets" in the .pro file (just guessing :-) 



That wasn't it (widgets were including and linking fine), but what I 
figured out is that the magic helper in Qt5 qtmain is now the library 
Qt6EntryPoint, and for some reason that wasn't being linked. Reading the 
qmake debug logs, the entrypoint-private module gets added to QT_PRIVATE 
during processing but then vanishes before it's used. In a test 
application, the entrypoint-private module then adds 
entrypoint-implementation which links the library and all is good.


I have no idea why entrypoint-private is disappearing from QT_PRIVATE, 
but I just added entrypoint-implementation to QT directly and I'll live 
with that for now.


Hamish

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


[Interest] unresolved WinMain on porting to Qt 6

2023-06-22 Thread Hamish Moffatt via Interest
I'm porting my applications to Qt6, from 5.15. Still using qmake. My 
console applications build and run fine, but my widgets applications 
fail to link with an error (Windows, VS 2022):


1>MSVCRTD.lib(exe_winmain.obj) : error LNK2019: unresolved external 
symbol WinMain referenced in function "int __cdecl invoke_main(void)" 
(?invoke_main@@YAHXZ)


I have a traditional entrypoint: int main(int argc, char* argv[]).


I see in Qt 5 there was a magic helper library qtmain, but this does not 
exist in Qt 6.


If I add the linker flag /ENTRY:mainCRTStartup then it builds. What's 
the correct Qt solution for this though?



Thanks

Hamish

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


Re: [Interest] Qt 6.4.3 compiler warnings in QTaggedPointer

2023-03-23 Thread Hamish Moffatt via Interest

On 23/3/23 18:15, Thiago Macieira wrote:

On Wednesday, 22 March 2023 18:19:59 HST Hamish Moffatt via Interest wrote:

static constexpr quint8 tagBits =
QtPrivate::qConstexprCountTrailingZeroBits(alignment);

So would you fix it with a cast, or by changing the variable type to int
to match the function?

Either solution is fine. I was thinking of simply adding a quint8() cast around
the result, but changing to uint also works too. The latter is a smaller
change anyway.

OK. There's a similar issue in QtConcurrent (unchanged since 5.15 
actually) also driving me mad - __int64 resulting from std::distance is 
assigned to int.



Hamish

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


Re: [Interest] Qt 6.4.3 compiler warnings in QTaggedPointer

2023-03-22 Thread Hamish Moffatt via Interest

On 23/3/23 05:00, Thiago Macieira wrote:


I don't see any changes since v6.4 that would fix that. It looks trivial though
to apply an explicit cast to silence that warning.

Any chance you can contribute it?


I started with a bug report, anyway: QTBUG-11.


static constexpr quint8 tagBits = 
QtPrivate::qConstexprCountTrailingZeroBits(alignment);


So would you fix it with a cast, or by changing the variable type to int 
to match the function?



Hamish

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


Re: [Interest] Qt 6.4.3 compiler warnings in QTaggedPointer

2023-03-22 Thread Hamish Moffatt via Interest

On 22/3/23 18:12, Thiago Macieira wrote:

On Tuesday, 21 March 2023 20:18:17 HST Hamish Moffatt via Interest wrote:

I'm porting from Qt 5.15.12 to 6.4.3, and now MSVC 2019 is giving me a
ton of compiler warnings about QTaggedPointer.

[cut]

Any suggestions on how to shut it up?

Stop using 2019, please. That compiler has a number of unfixed bugs.



Sorry, brain fart. It is indeed 2022, version 17.5.2 - the very latest.


Hamish

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


[Interest] Qt 6.4.3 compiler warnings in QTaggedPointer

2023-03-22 Thread Hamish Moffatt via Interest
I'm porting from Qt 5.15.12 to 6.4.3, and now MSVC 2019 is giving me a 
ton of compiler warnings about QTaggedPointer.


I don't know what that is, except I see it used in qproperty.h and I use 
a lot of Q_GADGET classes with Q_PROPERTYs.


I'm using /W3 in MSVC and compiling for 64-bit. I've enabled some extra 
warnings on top, but not C2424.



Any suggestions on how to shut it up?

Hamish



1>C:\qt\Qt6.4.2\6.4.2\msvc2019_64\include\QtCore\qtaggedpointer.h(24,1): 
warning C4242: 'initializing': conversion from 'uint' to 'const quint8', 
possible loss of data
1>C:\qt\Qt6.4.2\6.4.2\msvc2019_64\include\QtCore\qtaggedpointer.h(55,1): 
message : see reference to class template instantiation 
'QtPrivate::TagInfo' being compiled

1>    with
1>    [
1>    T=quint16
1>    ]
1>C:\qt\Qt6.4.2\6.4.2\msvc2019_64\include\QtCore\qtaggedpointer.h(49,1): 
message : while compiling class template member function 
'QTaggedPointer::Tag>::QTaggedPointer(T 
*,Tag) noexcept'

1>    with
1>    [
1>    Storage=quint16,
1>    T=quint16,
1> Tag=QtPrivate::QConstPreservingPointer::Tag
1>    ]
1>C:\qt\Qt6.4.2\6.4.2\msvc2019_64\include\QtCore\qiterable.h(32,24): 
message : see reference to function template instantiation 
'QTaggedPointer::Tag>::QTaggedPointer(T 
*,Tag) noexcept' being compiled

1>    with
1>    [
1>    Storage=quint16,
1>    T=quint16,
1> Tag=QtPrivate::QConstPreservingPointer::Tag
1>    ]
1>C:\qt\Qt6.4.2\6.4.2\msvc2019_64\include\QtCore\qiterable.h(19): 
message : see reference to class template instantiation 
'QTaggedPointer::Tag>' 
being compiled

1>    with
1>    [
1>    Storage=quint16
1>    ]
1>C:\qt\Qt6.4.2\6.4.2\msvc2019_64\include\QtCore\qiterable.h(413): 
message : see reference to class template instantiation 
'QtPrivate::QConstPreservingPointer' being compiled
1>C:\qt\Qt6.4.2\6.4.2\msvc2019_64\include\QtCore\qiterable.h(508,2): 
message : see reference to class template instantiation 
'QIterable' being compiled


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


Re: [Interest] can't dump QStringList with qDebug()

2023-03-07 Thread Hamish Moffatt via Interest

On 8/3/23 14:45, Thiago Macieira wrote:

On Tuesday, 7 March 2023 17:21:11 PST Hamish Moffatt via Interest wrote:

I said gcc 10 earlier, but I meant to say clang 11. But I also see it in
clang 14, and in VS 2019 (17.5.1 - latest).

Cannot reproduce with those files with GCC 11, 12, 13 or Clang 15, all with Qt
6.6.

Looking at the generated assembly, I can also see the compiler realised the
list is always empty, so the loop from printSequentialContainer() disappears.f



I confirm that my test code compiles in 6.5.0-beta3.


thanks

Hamish

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


Re: [Interest] can't dump QStringList with qDebug()

2023-03-07 Thread Hamish Moffatt via Interest

On 8/3/23 04:15, Thiago Macieira wrote:

On Monday, 6 March 2023 22:15:01 PST Hamish Moffatt via Interest wrote:

../../../../Qt6.4.2/6.4.2/gcc_64/include/QtCore/qdebug.h:217:53: note:
candidate template ignored: requirement
'std::conjunction_v,
QString>, QTypeTraits::has_ostream_operator>>' was
not satisfied [with T = QString]

This is the expected template and the compiler told us why it couldn't expand:
it thinks that the QDebugIfHasDebugStreamContainer condition wasn't satisfied.
That condition is

std::is_base_of OR QTypeTraits::has_ostream_operator

Obviously, QStringList is not a base class of QString; we're expecting the
second check to be true, that there's an output streaming operator for QDebug-
QString

That of course is there; it's in QDebug itself.

So my conclusion is that your compiler has a bug and improperly parsed the C++
code. Does this problem happen with GCC 11 or 12?

I said gcc 10 earlier, but I meant to say clang 11. But I also see it in 
clang 14, and in VS 2019 (17.5.1 - latest).


It seems to be related to #including the moc output in the cpp file.


Here's a minimal example:

Header file:

#pragma once

#include 
#include 

namespace TServer
{

class Test : public QObject
{
Q_OBJECT

private:
void test();

signals:
void databaseOpened(QString schoolCode);
void databaseEvent(QString schoolCode, QString notification);
void databaseRemoved(QString schoolCode, QString dbFilename);
};

}


Source file:

#include "server_database2.h"
#include 

#include 


void TServer::Test::test()
{
qDebug() << QStringList{};
}



Hamish

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


Re: [Interest] can't dump QStringList with qDebug()

2023-03-07 Thread Hamish Moffatt via Interest

On 7/3/23 20:11, Kai Köhne wrote:

Hi,

This looks like a compiler issue to me.

 const auto connections = QSqlDatabase::connectionNames();
 qDebug() << "Closing open connections:" << connections;

claiming that
../../../src/server/server_database.cpp:691:45: error: invalid operands to binary 
expression ('QDebug' and>
'const QList')

I think this is the place where it goes wrong:


../../../../Qt6.4.2/6.4.2/gcc_64/include/QtCore/qdebug.h:217:53: note: candidate template ignored: 
requirement 'std::conjunction_v, QString>, 
QTypeTraits::has_ostream_operator>>' was not satisfied [with T = QString]
inline QDebugIfHasDebugStreamContainer, T> operator<<(QDebug debug, const 
QList )
 ^

Anyhow, I couldn't reproduce this in a minimal example (and apparently you 
didn't manage either?). At minimum we need the exact compiler + compiler 
options passed on command line.



It's happening in both Visual C++ and gcc 10, but on further 
investigation, only in one .cpp file; the same code in other files works 
fine. I'll keep investigating.



thanks

Hamish

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


[Interest] can't dump QStringList with qDebug()

2023-03-06 Thread Hamish Moffatt via Interest
I'm porting my code to Qt6 (6.4.2) (from 5.15) and ran into this 
mysterious problem; this code doesn't compile:


    const auto connections = QSqlDatabase::connectionNames();
    qDebug() << "Closing open connections:" << connections;


claiming that

../../../src/server/server_database.cpp:691:45: error: invalid operands 
to binary expression ('QDebug' and 'const QList')


It then lists all the candidates, of which there are many.  I have a 
simple test program that compiles OK though.


The same occurs on both Visual Studio/Windows and gcc 10/Linux.

Am I missing an include or something?


Hamish



../../../../Qt6.4.2/6.4.2/gcc_64/include/QtCore/qdatastream.h:398:1: note: 
candidate function template not viable: no known conversion from 'QDebug' to 
'QDataStream &' for 1st argument
operator<<(QDataStream , const T )
^
../../../../Qt6.4.2/6.4.2/gcc_64/include/QtCore/qdatastream.h:415:63: note: 
candidate function template not viable: no known conversion from 'QDebug' to 
'QDataStream &' for 1st argument
inline QDataStreamIfHasOStreamOperatorsContainer, T> operator<<(QDataStream , 
const QList )
  ^
../../../../Qt6.4.2/6.4.2/gcc_64/include/QtCore/qobject.h:491:22: note: candidate 
function not viable: no known conversion from 'const QList' to 'const 
QObject *' for 2nd argument
Q_CORE_EXPORT QDebug operator<<(QDebug, const QObject *);
 ^
../../../../Qt6.4.2/6.4.2/gcc_64/include/QtSql/qsqldatabase.h:105:21: note: candidate 
function not viable: no known conversion from 'const QList' to 'const 
QSqlDatabase' for 2nd argument
Q_SQL_EXPORT QDebug operator<<(QDebug, const QSqlDatabase &);
^
../../../../Qt6.4.2/6.4.2/gcc_64/include/QtCore/qdebug.h:447:15: note: candidate 
function not viable: no known conversion from 'const QList' to 
'QKeyCombination' for 2nd argument
inline QDebug operator<<(QDebug debug, QKeyCombination combination)
  ^
../../../../Qt6.4.2/6.4.2/gcc_64/include/QtCore/qiodevice.h:143:22: note: candidate 
function not viable: no known conversion from 'const QList' to 
'QIODevice::OpenMode' (aka 'QFlags') for 2nd argument
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QIODevice::OpenMode modes);
 ^
../../../../Qt6.4.2/6.4.2/gcc_64/include/QtCore/qvariant.h:560:28: note: candidate 
function not viable: no known conversion from 'QDebug' to 'QDataStream &' for 
1st argument
Q_CORE_EXPORT QDataStream <<(QDataStream , const QVariant );
   ^
../../../../Qt6.4.2/6.4.2/gcc_64/include/QtCore/qvariant.h:622:22: note: candidate 
function not viable: no known conversion from 'const QList' to 'const 
QVariant::Type' for 2nd argument
Q_CORE_EXPORT QDebug operator<<(QDebug, const QVariant::Type);
 ^
../../../../Qt6.4.2/6.4.2/gcc_64/include/QtCore/qlocale.h:1142:22: note: candidate 
function not viable: no known conversion from 'const QList' to 'const 
QLocale' for 2nd argument
Q_CORE_EXPORT QDebug operator<<(QDebug, const QLocale &);
 ^
../../../../Qt6.4.2/6.4.2/gcc_64/include/QtCore/qdatetime.h:540:22: note: candidate 
function not viable: no known conversion from 'const QList' to 'QDate' 
for 2nd argument
Q_CORE_EXPORT QDebug operator<<(QDebug, QDate);
 ^
../../../../Qt6.4.2/6.4.2/gcc_64/include/QtCore/qdatetime.h:541:22: note: candidate 
function not viable: no known conversion from 'const QList' to 'QTime' 
for 2nd argument
Q_CORE_EXPORT QDebug operator<<(QDebug, QTime);
 ^
../../../../Qt6.4.2/6.4.2/gcc_64/include/QtCore/qdatetime.h:542:22: note: candidate 
function not viable: no known conversion from 'const QList' to 'const 
QDateTime' for 2nd argument
Q_CORE_EXPORT QDebug operator<<(QDebug, const QDateTime &);
 ^
../../../../Qt6.4.2/6.4.2/gcc_64/include/QtCore/qfileinfo.h:175:22: note: candidate 
function not viable: no known conversion from 'const QList' to 'const 
QFileInfo' for 2nd argument
Q_CORE_EXPORT QDebug operator<<(QDebug, const QFileInfo &);
 ^
../../../../Qt6.4.2/6.4.2/gcc_64/include/QtCore/qdir.h:244:22: note: candidate function not 
viable: no known conversion from 'const QList' to 'QDir::Filters' (aka 
'QFlags') for 2nd argument
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters);
 ^
../../../../Qt6.4.2/6.4.2/gcc_64/include/QtCore/qdir.h:245:22: note: candidate 
function not viable: no known conversion from 'const QList' to 'const 
QDir' for 2nd argument
Q_CORE_EXPORT QDebug operator<<(QDebug debug, const QDir );
 ^
../../../../Qt6.4.2/6.4.2/gcc_64/include/QtCore/qregularexpression.h:166:22: note: 
candidate function not viable: no known conversion from 'const QList' 
to 'const QRegularExpression' for 2nd argument
Q_CORE_EXPORT QDebug operator<<(QDebug debug, const QRegularExpression );
 ^

Re: [Interest] use of deleted function errors in QList / qarraydataops.h

2023-02-27 Thread Hamish Moffatt via Interest

On 28/2/23 12:00, Hamish Moffatt via Interest wrote:
Qt5's documentation (like Qt6's) does say "QVector's value type must 
be an assignable data type", so the mystery here is perhaps why our 
code works with Qt5. 



Even in Qt6, it compiles with other things in the struct that aren't 
assignable though, just not QVector.


struct T
{
int x = 0;
};

struct S
{
//const QVector v; // compiles if not const
const T t;
const int x = 0;
};

QVector pv;
pv.push_back({});



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


Re: [Interest] use of deleted function errors in QList / qarraydataops.h

2023-02-27 Thread Hamish Moffatt via Interest

On 28/2/23 11:49, Thiago Macieira wrote:

On Monday, 27 February 2023 16:22:46 PST Hamish Moffatt via Interest wrote:

How and when would Qt5 show an error? We have the above code working and
in production, and I'm able resize, copy and change, force a detach -
operations where QVector would need to copy elements.

Ah, looks like it isn't going to. I expected the issue was that it didn't
happen in this test case because it never detached. If you're definitely
detaching, then this isn't the same issue.

The issue here is that you have a type that is copy/move constructible, but
cannot be copy/move assigned. That's usually a bad combination; the new QList/
QVector code uses move-assignment when moving elements in the overlapping part
of the list.

We could determine that your type is not move-assignable and use a different
strategy, but this isn't implemented right now. It might be less efficient; I
wouldn't know.



Qt5's documentation (like Qt6's) does say "QVector's value type must be 
an assignable data type", so the mystery here is perhaps why our code 
works with Qt5.



Thanks,

Hamish

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


Re: [Interest] use of deleted function errors in QList / qarraydataops.h

2023-02-27 Thread Hamish Moffatt via Interest

On 28/2/23 11:14, Thiago Macieira wrote:

On Monday, 27 February 2023 13:05:01 PST Hamish Moffatt via Interest wrote:

On 28/2/23 04:14, Thiago Macieira wrote:

On Sunday, 26 February 2023 23:24:43 PST Hamish Moffatt via Interest wrote:

Is there a solution?

Remove the const in:
   struct S
   {
   
   const QVector v; // compiles if not const
   
   };


If S is not copyable, then QVector can't copy it and QVector requires
copying all its elements.

May I ask why that is? Qt5 QVector and std::vector are both OK with the
above.

Qt 5 QVector is not ok with the above, it just hasn't produced an error *yet*.
All Qt main containers are implicitly-shared and therefore must be able to
copy their elements. Therefore, your elements must be copyable.

std::vector doesn't have this requirement. It is copyable if the element is
copyable, otherwise it isn't.

How and when would Qt5 show an error? We have the above code working and 
in production, and I'm able resize, copy and change, force a detach - 
operations where QVector would need to copy elements.



Hamish

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


Re: [Interest] use of deleted function errors in QList / qarraydataops.h

2023-02-27 Thread Hamish Moffatt via Interest

On 28/2/23 04:14, Thiago Macieira wrote:

On Sunday, 26 February 2023 23:24:43 PST Hamish Moffatt via Interest wrote:

Is there a solution?

Remove the const in:

  struct S
  {
  const QVector v; // compiles if not const
  };

If S is not copyable, then QVector can't copy it and QVector requires copying
all its elements.


May I ask why that is? Qt5 QVector and std::vector are both OK with the 
above.



Hamish

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


[Interest] use of deleted function errors in QList / qarraydataops.h

2023-02-26 Thread Hamish Moffatt via Interest

I have some code which boils down to this:


#include 

void test()

{

    struct S

    {

        const QVector v; // compiles if not const

    };

    QVector> pv; // doesn't compile with this

    //std::vector> pv; // compiles with this

    pv.push_back(std::make_pair({}, {}));

}


This compiles in Qt 5.15.12, but not in 6.4.2.

The last line generates no less than 4 errors, resulting in pages and 
pages of output, but essentially:


../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qarraydataops.h:472:29: error: use of deleted function 
‘std::pair& std::pair::operator=(const 
std::pair&)’
  472 | last[i] = std::move(last[i - 1]);
  | ^~~~
--
../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qarraydataops.h:475:24: error: use of deleted function 
‘std::pair& std::pair::operator=(const 
std::pair&)’
  475 | *where = std::move(t);
  | ~~~^~
--
../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qcontainertools_impl.h:132:18: error: use of deleted 
function ‘std::pair& std::pair::operator=(const std::pair&)’
  132 | *d_first = std::move_if_noexcept(*first);
  | ~^~~
--
../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qcontainertools_impl.h:132:18: error: use of deleted 
function ‘std::pair& std::pair::operator=(const std::pair&)’


As per the comments, it compiles if the member variable in the inner 
struct is not const, or if I use a std::vector instead of QVector.


Is there a solution?

Full error text below.


Hamish




In file included from 
../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qarraydatapointer.h:7,

 from ../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qlist.h:8,

 from ../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qvector.h:7,

 from ../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/QVector:1,

 from test.cc:1:

../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qarraydataops.h: In instantiation of ‘void 
QtPrivate::QGenericArrayOps::Inserter::insertOne(qsizetype, T&&) [with T = 
std::pair; qsizetype = long long int]’:

../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qarraydataops.h:557:37:   required from ‘void 
QtPrivate::QGenericArrayOps::emplace(qsizetype, Args&& ...) [with Args = 
{std::pair}; T = std::pair; qsizetype = long long 
int]’

../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qlist.h:852:15:   required from ‘T& 
QList::emplaceBack(Args&& ...) [with Args = {std::pair}; T = 
std::pair; QList::reference = std::pair&]’

../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qlist.h:440:24:   required from ‘void 
QList::append(QList::rvalue_ref) [with T = std::pair; 
QList::rvalue_ref = std::pair&&]’

../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qlist.h:652:42:   required from ‘void 
QList::push_back(QList::rvalue_ref) [with T = std::pair; 
QList::rvalue_ref = std::pair&&]’

test.cc:13:43:   required from here

../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qarraydataops.h:472:29: error: use of deleted function 
‘std::pair& std::pair::operator=(const 
std::pair&)’

  472 | last[i] = std::move(last[i - 1]);

  | ^~~~

In file included from /usr/include/c++/10/utility:70,

 from 
../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qglobal.h:11,

 from ../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qpair.h:7,

 from 
../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qarraydata.h:8,

 from 
../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qarraydataops.h:8,

 from 
../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qarraydatapointer.h:7,

 from ../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qlist.h:8,

 from ../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qvector.h:7,

 from ../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/QVector:1,

 from test.cc:1:

/usr/include/c++/10/bits/stl_pair.h:211:12: note: ‘std::pair& 
std::pair::operator=(const std::pair&)’ is 
implicitly declared as deleted because ‘std::pair’ declares a move constructor or 
move assignment operator

  211 | struct pair

  |    ^~~~

In file included from 
../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qarraydatapointer.h:7,

 from ../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qlist.h:8,

 from ../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qvector.h:7,

 from ../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/QVector:1,

 from test.cc:1:

../../dev/Qt6.4.2/6.4.2/gcc_64/include/QtCore/qarraydataops.h:475:24: error: use of deleted function 
‘std::pair& std::pair::operator=(const 
std::pair&)’

  475 | *where = std::move(t);

  | ~~~^~

In file included from 

Re: [Interest] MSVC not-the-latest: are you using it? why?

2023-01-26 Thread Hamish Moffatt via Interest

On 26/1/23 03:52, Thiago Macieira wrote:
The reason I asked about VS2019, aside from the simple learning of 
many things

I did not anticipate, is that we're seeing it have C++ compliance issues. This
is not even C++20 or 17; it's a plain constexpr function that should have
worked with C++14.

Is it actually VS 2019 you want to drop, or the v142 toolset and 
earlier? Because VS2022 would support compiling with v142 also (and 
earlier) but I guess that's what doesn't work.


We have used older compilers in newer VS in the past, but not for any 
good particularly good reason other than being conservative about upgrading.



Hamish

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


[Interest] QScopedPointer::create

2023-01-18 Thread Hamish Moffatt via Interest
Is there any reason why QScopedPointer doesn't have a create static 
method, like QSharedPointer does?


I didn't see any requests for it in jira. Should I just use unique_ptr 
instead?


Hamish

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


Re: [Interest] Qt 6.5 Is Irrelevant...

2022-12-22 Thread Hamish Moffatt via Interest

On 21/12/22 06:38, Allan Sandfeld Jensen wrote:

On Montag, 19. Dezember 2022 16:59:41 CET Michael Jackson wrote:

So not really a “jolt every 3 years”. You have had 3 _total_ jolts over the
course of 30 years.


Except them dropping support for pre-AVX, pre-AVX2 CPUs,



Big Sur (macOS 11), released 2.5 years ago and still supported, runs on 
Macs dating back to 2013. https://support.apple.com/en-us/HT211238


I suffer from this problem too (users sticking to old OS releases), but 
I don't think Apple is being too unreasonable in this particular case.



Hamish

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


Re: [Interest] Official linuxdeployqt ?

2022-08-09 Thread Hamish Moffatt via Interest

On 9/8/22 23:50, Roland Hughes via Interest wrote:


On 8/9/22 05:00, Vadim Peretokin wrote:

Just to correct some biases here, in my opinion as a software publisher
AppImage is still the simplest way for a user to run your app.?

To get Mudlet (a FOSS text games client) all you need to do is go to
https://www.mudlet.org/download, download the .tar, right-click to
extract it and double-click to run.?


Not to discount your experience, but I've been in IT almost 40 years 
now. Not once in my career have I ever used an AppImage. I have used 
Debian, RPM, Snap, and Flatpak.


Most companies and many Linux distros have started making it more 
difficult for someone to "just download and install from a Web site" 
because Malware is everywhere.


When your OpenSource project includes the scripts to make a proper 
Debian or RPM package, you dramatically increase the odds of getting 
your package into the actual distro repos. Does any distro actually 
put AppImage files in their repo? I'm asking. I have never heard of it 
but that doesn't mean there isn't some obscure distro doing that. 



I have never used an AppImage in 25 years of Debian and Linux experience 
either. It sounds equivalent to downloading a random unsigned .EXE from 
a web site and running it. I prefer official deb packages, or OCI/Docker 
container images, or at least a proper third party deb (ideally in a 
repository).



Flatpak offers signed builds and sandboxing. If you were going to build 
a deployment format into linux deployqt it would have to be a modern 
format that included signing and sandboxing.



regards

Hamish

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


Re: [Interest] Official linuxdeployqt ?

2022-08-08 Thread Hamish Moffatt via Interest

On 8/8/22 16:09, Jörg Bornemann wrote:
Mitch already pointed you to QTBUG-74940.  The biggest question 
regarding a linuxdeployqt is: what exactly is the deployment format 
going to be?  There's no standard way of deploying Linux applications. 
There are many.


The community contributions create AppImage packages.  That seems to 
be a reasonable choice.  Other opinions?



Like Roland said, it has to be Flatpak. I haven't seen anyone talking 
about AppImage in years, and Snap is too Ubuntu-specific.



windeployqt doesn't package anything though, so should linuxdeployqt? 
macdeployqt only sort of does, with its dmg support.



Hamish

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


Re: [Interest] QtWebEngine crash after codesign

2022-04-29 Thread Hamish Moffatt via Interest

On 30/4/22 00:56, Alexander Carôt wrote:

codesign --options=runtime --deep ./simplebrowser.app -s "Developer ID 
Application:–xyz"


The hardened runtime (--options=runtime) causes the web engine to crash. 
You need to add entitlements while signing it.


See: https://forum.qt.io/topic/102212/qtwebengine-signing-issues/4

You only need that on the web engine process, not the whole application, 
which messes with the --deep a bit.



Hamish

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


Re: [Interest] webengine for iOS

2022-04-28 Thread Hamish Moffatt via Interest

On 29/4/22 15:32, Alexander Carôt wrote:
>>>Apple don't allow the use of any browser on iOS except the the 
system web view.
Wow – again I am "amazed" by the tough iOS restrictions. I have never 
experienced such huge amount of regulations before. Well, it has its 
pros and cons, however, from the developer's point of view it's kind 
of a pain ... sometimes ;-)


Even Chrome and Firefox on iOS are actually just wrappers around the iOS 
web view.


It has been argued that this is anti-competitive behaviour on Apple's 
part, but unless you can convince a regulator of that nothing will change.




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


Re: [Interest] webengine for iOS

2022-04-28 Thread Hamish Moffatt via Interest

On 29/4/22 04:30, Alexander Carôt wrote:

>>There is no qtwebenigne on ios , use qtwebview instead.
Ah – ok, good to know but I'd also be curious to know why.



Apple don't allow the use of any browser on iOS except the the system 
web view.



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


Re: [Interest] macdeployqt on Monterey 12.3.1

2022-04-27 Thread Hamish Moffatt via Interest

On 27/4/22 18:25, Hamish Moffatt wrote:

On 27/4/22 17:05, Alexander Carôt wrote:
>>That's not guaranteed to work. Major versions 7 and 8 are unlikely 
to be compatible (else they wouldn't have changed the version number 
with all the difficulty that creates).
Agreed, however, the question is if anyone else besides me can 
reproduce the issue so I can file a bug report.

At least the solution works as a temporary workaround for me.


Your error message said

ERROR: "dyld[17429]: Library not loaded: /opt/local/lib/libffi.7.dylib\n  Referenced 
from: /opt/local/libexec/llvm-10/lib/libLLVM.dylib\n  Reason: tried: 
'/opt/local/lib/libffi.7.dylib' (no such file), '/usr/local/lib/libffi.7.dylib' (no such 
file), '/usr/lib/libffi.7.dylib' (no such file)Library not loaded: 
/opt/local/lib/libcrypto.1.1.dylib\n  Referenced from: /opt/local/lib/libxar.1.dylib\n  
Reason: tried: '/opt/local/lib/libcrypto.1.1.dylib' (no such file), 
'/usr/local/lib/libcrypto.1.1.dylib' (no such file), '/usr/lib/libcrypto.1.1.dylib' (no 
such file)\nfatal error: /opt/local/bin/otool: fatal error in 
/opt/local/bin/llvm-objdump-mp-10\n"


What provides your /opt/local/libexec/llvm-10/lib/libLLVM.dylib ? Is 
that from brew by any chance? It doesn't look like the Xcode compiler 
path.




Your problem sounds a bit like 
https://stackoverflow.com/questions/71790401/otool-is-referencing-an-old-version-of-libffi




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


Re: [Interest] macdeployqt on Monterey 12.3.1

2022-04-27 Thread Hamish Moffatt via Interest

On 27/4/22 17:05, Alexander Carôt wrote:
>>That's not guaranteed to work. Major versions 7 and 8 are unlikely 
to be compatible (else they wouldn't have changed the version number 
with all the difficulty that creates).
Agreed, however, the question is if anyone else besides me can 
reproduce the issue so I can file a bug report.

At least the solution works as a temporary workaround for me.


Your error message said

ERROR: "dyld[17429]: Library not loaded: /opt/local/lib/libffi.7.dylib\n  Referenced 
from: /opt/local/libexec/llvm-10/lib/libLLVM.dylib\n  Reason: tried: 
'/opt/local/lib/libffi.7.dylib' (no such file), '/usr/local/lib/libffi.7.dylib' (no such 
file), '/usr/lib/libffi.7.dylib' (no such file)Library not loaded: 
/opt/local/lib/libcrypto.1.1.dylib\n  Referenced from: /opt/local/lib/libxar.1.dylib\n  
Reason: tried: '/opt/local/lib/libcrypto.1.1.dylib' (no such file), 
'/usr/local/lib/libcrypto.1.1.dylib' (no such file), '/usr/lib/libcrypto.1.1.dylib' (no 
such file)\nfatal error: /opt/local/bin/otool: fatal error in 
/opt/local/bin/llvm-objdump-mp-10\n"


What provides your /opt/local/libexec/llvm-10/lib/libLLVM.dylib ? Is 
that from brew by any chance? It doesn't look like the Xcode compiler path.



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


Re: [Interest] macdeployqt on Monterey 12.3.1

2022-04-26 Thread Hamish Moffatt via Interest

On 26/4/22 15:56, Alexander Carôt wrote:


Thanks for the pointer, however, it looks rather trivial as if it is 
asking for lib versions not existent on Monterey. In order to make it 
workI simply created symbolic links to the current ones:


sudo ln -s libffi.8.dylib libffi.7.dylib

sudo ln -s libcrypto.3.dylib libcrypto.1.1.dylib




That's not guaranteed to work. Major versions 7 and 8 are unlikely to be 
compatible (else they wouldn't have changed the version number with all 
the difficulty that creates).



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


Re: [Interest] qtwebbroser questions

2022-04-12 Thread Hamish Moffatt via Interest

On 11/4/22 22:52, Alexander Carôt wrote:

Thus, I decided to continue using the minibrowser code which already is Qt6 
ready and worked out fine for me so far. However, here I have the problem that 
it does not store cookies. I did some research and found e.g.

https://stackoverflow.com/questions/19069680/can-you-use-qwebview-cookies-sessions-with-qnetworkaccessmanager

which explains how to set cookies for QWebView but the problem with the example 
code is that QWebView is implemented via QML so the question is how to enable 
cookies this way.



Do you just need to set the persistent cookie policy in QWebEngineProfile?


amish


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


Re: [Interest] qtwebbroser questions

2022-04-12 Thread Hamish Moffatt via Interest

On 11/4/22 22:52, Alexander Carôt wrote:


Thus, I decided to continue using the minibrowser code which already is Qt6 
ready and worked out fine for me so far. However, here I have the problem that 
it does not store cookies. I did some research and found e.g.

https://stackoverflow.com/questions/19069680/can-you-use-qwebview-cookies-sessions-with-qnetworkaccessmanager

which explains how to set cookies for QWebView but the problem with the example 
code is that QWebView is implemented via QML so the question is how to enable 
cookies this way.



Do you just need to set the persistent cookie policy in QWebEngineProfile?


amish

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


Re: [Interest] can't debug 64bit intel windows app on ARM CPU

2022-01-25 Thread Hamish Moffatt via Interest

On 26/1/22 05:49, Cristian Adam wrote:


Hi,

Please open a bug report at https://bugreports.qt.io/

Which Windows version are you using? Only Windows 11 has support for 
x64 virtualization for Arm64 machines.




It sounds like a Visual Studio installation issue and nothing to do with 
Qt



Hamish

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


Re: [Interest] SQLite database: avoid high memory usage?

2022-01-24 Thread Hamish Moffatt via Interest

On 24/1/22 19:40, Alexander Dyagilev wrote:

Hello,

Let's suppose we have a database file of 16GB in size.

We open it using this code:

m_db = QSqlDatabase::addDatabase(
 "QSQLITE",
 dbConnectionName());
m_db.setConnectOptions("PRAGMA jounal_mode=WAL;");
m_db.setDatabaseName(m_dbPath);
m_db.open();

After this, our process will use 16GB of memory (at least, under 
Windows OS). I.e. the whole database file is loaded into the memory.


Is there a way to avoid this? 



Did you mean to misspell journal_mode?

Are you sure it's real memory usage and not just address space used by mmap?


Hamish

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


Re: [Interest] Please let us choose Qt Creator version in the online installer

2022-01-09 Thread Hamish Moffatt via Interest

On 27/12/21 01:46, Pavel Koshevoy wrote:


Also, the maintenance tool needs to be smart enough not to install an 
incompatible build of Qt Creator on an older version of macos where it 
can't even run.



It would be even better if the installer didn't force you to install 
Creator at all. We don't use it (preferring Visual Studio and Xcode and 
standalone Qt Assistant/Designer), so we don't need it installed.




Hamish

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


Re: [Interest] SSL & Let's Encrypt certificate expiration

2021-10-06 Thread Hamish Moffatt via Interest

On 7/10/21 02:53, Thiago Macieira wrote:

On Wednesday, 6 October 2021 02:41:39 PDT Hamish Moffatt via Interest wrote:

I upgraded to 1.0.2u and added the X1 root directly to Qt. Now the
application works. But the instructions from OpenSSL say to also remove
the X3 root which I'm not able to do (it's loaded from Windows), so I am
puzzled by why this works. I have not done anything special when
generating my certificates like requesting the alternate certificate chain.

If OpenSSL has any path to a still-valid root certificate, then it can ignore
the others. That's one way of dealing with expirations: you add a new link in
the chain that will continue to be valid when the other path(s) aren't.



The OpenSSL blog writes that this unfortunately doesn't happen with 
1.0.2 though - it sees the expired root and gives up. 
https://www.openssl.org/blog/blog/2021/09/13/LetsEncryptRootCertExpire/



Hamish

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


Re: [Interest] SSL & Let's Encrypt certificate expiration

2021-10-06 Thread Hamish Moffatt via Interest

On 7/10/21 02:48, Thiago Macieira wrote:

On Tuesday, 5 October 2021 17:03:43 PDT Hamish Moffatt via Interest wrote:

We have had some difficulty here with Windows 10's "lazy loading" of the
root certificates. Unless users have been to a site that uses the ISRG
X1 root certificate using Chrome or Edge, they do not have this
certificate and it is not available to Qt. As soon as they visit a site
that uses the new root in Chrome or Edge, Windows loads the certificate
and it works in Qt.

Interesting. That means there's an API that they're using that causes Windows
to download the certificate, but we don't use it. Can one of you file a bug on
this particular issue on Windows?


Done, QTBUG-97168.


Hamish

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


Re: [Interest] SSL & Let's Encrypt certificate expiration

2021-10-06 Thread Hamish Moffatt via Interest

On 6/10/21 20:02, Christophe Thomas wrote:
Thank you for the hint, I found this link that talks about it: 
https://community.letsencrypt.org/t/isrg-root-lazy-loading-problem-missing-from-random-updated-windows-10-versions/141550/2 



We've also tested on an old linux (ubuntu 16),

when trying to connect one test website, openssl is not finalizing the 
connection due to expired DST Root X3, and we can see that the chain is

website cert  => ISRG X1 root => DST Root X3

doing the same test with our own software (that uses our own shipped 
lib for openssl) from scratch we fail and we can see we use the same 
chain as above.


Third test still with our software but forcing loading the ca cert 
before first connexion (see first email from maitai => 
def.setCaCertificates(QSslConfiguration::systemCaCertificates());)
In this case we still have the same chain reported, but with DST Root 
X3 expire in 2024 and the connexion is OK


Also on this device, we find the ISRG_Root_X3.pem that is expired.



We still support an old version of our app shipped with Qt 5.8 and 
OpenSSL 1.0.1. This stopped working when the X3 root expired, as expected.


I upgraded to 1.0.2u and added the X1 root directly to Qt. Now the 
application works. But the instructions from OpenSSL say to also remove 
the X3 root which I'm not able to do (it's loaded from Windows), so I am 
puzzled by why this works. I have not done anything special when 
generating my certificates like requesting the alternate certificate chain.



I have Qt 5.15 (OpenSSL 1.1) applications deployed on Debian 10 and have 
not had to do anything to keep that working.



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


Re: [Interest] SSL & Let's Encrypt certificate expiration

2021-10-05 Thread Hamish Moffatt via Interest

On 6/10/21 06:13, Thiago Macieira wrote:

On Tuesday, 5 October 2021 11:45:23 PDT Christophe Thomas wrote:

For the cert chain we are currently using the default LE setting so we
currently provide the X1 Cross signed with expired X3.

Netherless, the issue is that strangely we need to force caCertificate load
in order to have the connexion accepted.

In the client's system, is the ISRG Root X1 certificate present? Can you check
with plain openssl s_client command to see if the problem is OpenSSL?



We have had some difficulty here with Windows 10's "lazy loading" of the 
root certificates. Unless users have been to a site that uses the ISRG 
X1 root certificate using Chrome or Edge, they do not have this 
certificate and it is not available to Qt. As soon as they visit a site 
that uses the new root in Chrome or Edge, Windows loads the certificate 
and it works in Qt.




Hamish

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


[Interest] QJSEngine won't evaluate octal literal

2021-08-03 Thread Hamish Moffatt via Interest
I have the following test code to evaluate an octal literal which I'm 
running on Qt 5.12 and 5.15;


            QJSEngine eng;
            auto jsv = eng.evaluate("(function(){return 011;})()");
            qDebug() << jsv.isError() << jsv.toString() << jsv.toVariant();

This outputs:

true "SyntaxError: Expected token `;'" QVariant(QVariantMap, QMap())


It works if I use hex literals, and the octal code works in node.js. Why 
doesn't it work in QJSEngine?



Hamish

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


Re: [Interest] Qt Creator: is it possible to use Visual C++ 2019 with 5.12.10?

2021-05-17 Thread Hamish Moffatt

On 17/5/21 8:24 pm, Alexander Dyagilev wrote:

Hello,

Is it OK on Windows to install Qt Creator + Qt 5.12.10 + Visual C++ 2019?

I know that 2017 and 2019 are binary compatible. But anyway will Qt 
Creator build without any errors in such configuration?



I don't use Creator, but we've been using VS 2019 with Qt 5.12 (.7) for 
ages and have no problems.



Hamish


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


Re: [Interest] Interest Digest, Vol 114, Issue 38

2021-03-27 Thread Hamish Moffatt

On 27/3/21 9:04 pm, Roland Hughes wrote:
If I read Scott's original posts correctly, the compelling reason is a 
roughly $1 billion multi-year project was started and the OS 
physically cannot be changed out until that many year project is over. 
The UI can be updated and new functionality added.


You get such projects in the industrial controls world. Generally 
custom device drivers for custom devices that are part of a production 
process. It is too expensive in terms of down time and development 
costs to switch to a new OS version.


If memory serves he is talking about chip fabrication. Downtime is 
most likely measured at > $1 million per day.


In the medical device world it is almost impossible to change out an 
OS without having to go down the "new product" approval process. That 
is lengthy and expensive.


You can, because the design of the device mitigates RISK the UI could 
pose to patient safety/health, change out the UI library and go down 
the "minor enhancements" (I forget the correct name) FDA approval 
path. This is by no means free, but it is far less expensive and time 
consuming.


If you __have__ to open the hood for a regulatory change, like the 
service password example I gave, most companies will try to freshen up 
the screen library to get better graphics and performance 
improvements. Every performance improvement can help extend battery life.


On 3/26/2021 10:13 PM, interest-requ...@qt-project.org wrote:

I still haven't seen any convincing argument on why you expect to use a
brand new Qt with ancient compilers/OSs?




None of that was an argument for upgrading Qt, just for not upgrading 
the rest.




Hamish

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


Re: [Interest] the path forward - that 7 year thing - was willy-nilly

2021-03-26 Thread Hamish Moffatt

On 27/3/21 11:47 am, Scott Bloom wrote:

Sorry for top posting...

But I disagree here.  Even for mac, Qt 5 is 9 years old, 4 lived 6 (4.0->4.8 
LTS initial release, 4.8 lived for 3 years)

Im not saying we go to a Qt Major version for every mac system style change.  
But if they produce a SDK where previous version is so different than the new 
one, that the same Qt code needs a #ifdef XXX version, so be it.

Yes, its more work.



It's a runtime issue on macOS too, not just development. Recent macOS 
won't run anything compiled with an SDK earlier than the 10.9 version 
(due to their notarization requirements), so you can't keep compiling 
with an ancient toolchain. I don't know if you can use Qt 5.0 with the 
10.9 SDK, but I doubt it because Apple is quite aggressive about API 
deprecation.


I still haven't seen any convincing argument on why you expect to use a 
brand new Qt with ancient compilers/OSs?



Hamish

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


Re: [Interest] the path forward - that 7 year thing - was willy-nilly

2021-03-26 Thread Hamish Moffatt

On 27/3/21 11:23 am, Scott Bloom wrote:

To be clear.  Roland and I are talking about very different issues.

To me, Qt should continue to support OS's/Compilers for the life of a Major 
version of Qt.  if it built on Qt 5.0 it should build on that OS/Compiler in 
5.15

If Qt decides that modern C++ was more important in 5.13, and the compilers 
available on an OS/Compiler are no longer compiling Qt, then frankly, its time 
to move to Qt 6

There are many open source tool sets, that have parallel paths for a certain 
time.  Qt 4 is a good example. The late stage Qt4 was still being supported and 
new patch versions being put out as Qt 5 was rolling out.

I do NOT expect to start a project in Qt3 on CentOS 3/4 (or whatever it was) to 
be able to trivially rebuilt in Qt 4, or 5 when I move to CentOS 7

But If Im still using Qt 5.9 LTS, and decide to move to Qt 5.15 (skipping 12), 
I don’t expect my OSes to no longer be supported.  If there was functionality 
being added to 13 that made a version of a compiler/OS no longer valid to 
target? Make that functionality/code for Qt 6



I'm not sure what you're asking is even possible on macOS. They churn 
the compiler and the SDK so quickly compared to the 8 year development 
life of Qt 5.


I would ideally like Qt to support deployment on macOS versions slightly 
older than they do. Not all the way back to what was supported in 5.0 
though.


I don't see any compelling reason to be compiling with the latest Qt on 
ancient compilers/OSs though.



Hamish

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


Re: [Interest] the path forward - that 7 year thing - was willy-nilly

2021-03-25 Thread Hamish Moffatt

On 26/3/21 6:38 am, Roland Hughes wrote:

According to the FDA fact sheet.

https://www.fda.gov/about-fda/fda-basics/fact-sheet-fda-glance

There are currently 25,864 registered FDA medical device facilities. 
Not one of them can change a single approved process without going 
through the FDA approval process for said change. That is __NOT__ a 
sprint nor is it cheap. Within the past 18 months a drug manufacturer 
in high priced California put out a cattle call for a PDP 11/44 (might 
have been 24) system manager. Those machines were last made around 
1978. There is a group of them still making necessary drugs in California.


Once something is in place it stays there because it is incredibly 
expensive to replace.



Qt's horizon is about 7 years.
That's 8 years too short. 

Anything coded to Qt 3.x needs to ported first to 4.8, before going to 5.0.
Once you're in the 5.x series, port to 5.15 and fix the warnings. Once you're
clean in a working build, port to Qt 6.


There is no one who went to a good school for their IT degree where 
they made the person take Cost Accounting ever going to utter that as 
a valid path forward.


There is no MBA, even from a shit school like Keller, that is going to 
sign off on such a project.




I really don't understand your arguments Roland. You say you need Qt 
support for 15 years, but you can't actually change one bit of your 
software without FDA approval, so presumably this means you aren't 
upgrading Qt anyway. Then after 15 years you want to work on a new model 
of the device, starting with your existing code, and you expect it to 
compile with the latest Qt unchanged?



Someone else was talking about support for RHEL 6. Why do you expect to 
use the latest Qt with an ancient OS? Is it reasonable to expect to use 
new Qt with an ancient OS?


I see that the latest Microsoft Visual C++ compiler toolset (v142) 
doesn't support building for Windows XP. You can still use an older 
compiler. That seems like a reasonable compromise.




Hamish

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


Re: [Interest] Mixing Commercial and Open Source license for, different, projects

2021-03-19 Thread Hamish Moffatt

On 18/3/21 10:41 pm, Christian Gagneraud wrote:

My main grief is that Qt doesn't seem to care about C++.
What was their last contribution to the standard?



I find that to be a bit of a weird comment. Qt needs to work with the 
compilers/standard libraries that we the users have now. Why would you 
expect them to be pushing the standards?



Hamish

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


Re: [Interest] Qt 6 Ubuntu package

2021-01-28 Thread Hamish Moffatt

On 28/1/21 5:56 pm, Florian Bruhin wrote:

Hey,

On Thu, Jan 28, 2021 at 12:08:44PM +0530, Nibedit Dey wrote:

I am looking for a way to install Qt6 without downloading the
*qt-unified-linux-x86-4.0.1-online.run* file.
Is there a Qt 6 Ubuntu package like the one for Qt 5? e.g.:- *sudo apt-get
install qt5-default*

Ubuntu's packages are mostly inherited from Debian, where the Qt package
maintainers stepped down before the Qt 6 release because of a lack of
time:



I've been using this PPA for Qt packages: https://launchpad.net/~beineri 
although there is no Qt 6 there yet. These packages install in /opt and 
don't conflict with the Debian/Ubuntu-provided Qt packages.


Despite them being for Ubuntu I have installed them on Debian bullseye, 
although I did recompile qtbase mostly to fix an SQL driver problem.



Hamish

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


Re: [Interest] Compiling Qt5 (any version past 5.99) for Apple Silicon/M1

2021-01-13 Thread Hamish Moffatt

On 14/1/21 6:28 am, Michael Jackson wrote:


Has anybody successfully compiled any version of Qt5 as a native arm64 
set of frameworks on a MacOS M1 machine yet? If so could you share 
your configure command.




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



Hamish

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


Re: [Interest] Will a Qt 5.x release support macOS 11?

2020-12-09 Thread Hamish Moffatt

On 9/12/20 8:11 pm, coroberti wrote:

Dear Hamish,
Yes, this is the case.

Some bugs like in webengine (chromium) have been filed,
but it could be there are others.

After getting the new HW, we'll be more knowledgeable.

Regarding the native compilation, it seems that there are good patches already
made by Tor Arne Vestbo, and the folks are compiling successfully:

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



To be useful I think we also need universal binaries for Qt, and support 
for making our own universal binaries in qmake, macdeployqt etc. I think 
there are also bugs in JIRA for those.


Unfortunately we can't build separate ARM/Intel packages and expect our 
users to know which to install.



Hamish

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


Re: [Interest] Will a Qt 5.x release support macOS 11?

2020-12-09 Thread Hamish Moffatt
Interesting. If it doesn't work on the M1, isn't that a Rosetta bug? I assume 
you haven't compiled for M1 yet given the Qt support is not released.


Hamish

Sent from Nine

From: coroberti 
Sent: Wednesday, 9 December 2020 19:28
To: Qt Interest
Cc: Hamish Moffatt
Subject: Re: [Interest] Will a Qt 5.x release support macOS 11?

Gentlemen, 
Make sure it works fine both on the Intel CPU and the new Apple M1. 

In our case, there are issues on Intel CPU and crashes on M1. 

Kind regards, 
Robert Iakobashvili 
 

On Wed, Dec 9, 2020 at 10:09 AM Hamish Moffatt 
 wrote: 
> 
> On 9/12/20 6:07 pm, Ben Haller via Interest wrote: 
> > Hi all.  Just wondering whether there is any plan for any Qt 5.x release to 
> > support macOS 11.  At present, Qt 5.15 supports only through macOS 10.15 
> > (https://doc.qt.io/qt-5/macos.html#supported-versions), as far as I can 
> > tell, and my app built on macOS 10.15 apparently does not run properly on 
> > macOS 11 (so my users inform me).  Since it looks like it will be a little 
> > while before a Qt 6 release is really solid (I just saw on the list that 
> > the first LTS release of Qt 6 is expected in September 2021, almost a year 
> > from now), it would be really nice if macOS 11 were added to the list of 
> > supported releases for 5.15.  Any chance of that?  I have users who are 
> > already on macOS 11 now; I’d like to have a better story for them.  Thanks 
> > for any info! 
> 
> Our app (built with Qt 5.12) is working fine on 11. Why not get OS 11 
> and test yourself? 
> 
> 
> 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] Will a Qt 5.x release support macOS 11?

2020-12-09 Thread Hamish Moffatt

On 9/12/20 6:07 pm, Ben Haller via Interest wrote:

Hi all.  Just wondering whether there is any plan for any Qt 5.x release to 
support macOS 11.  At present, Qt 5.15 supports only through macOS 10.15 
(https://doc.qt.io/qt-5/macos.html#supported-versions), as far as I can tell, 
and my app built on macOS 10.15 apparently does not run properly on macOS 11 
(so my users inform me).  Since it looks like it will be a little while before 
a Qt 6 release is really solid (I just saw on the list that the first LTS 
release of Qt 6 is expected in September 2021, almost a year from now), it 
would be really nice if macOS 11 were added to the list of supported releases 
for 5.15.  Any chance of that?  I have users who are already on macOS 11 now; 
I’d like to have a better story for them.  Thanks for any info!


Our app (built with Qt 5.12) is working fine on 11. Why not get OS 11 
and test yourself?



Hamish

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


Re: [Interest] Qt5 font size issue with fontconfig

2020-11-12 Thread Hamish Moffatt

On 12/11/20 8:47 pm, Florian Bruhin wrote:

On Thu, Nov 12, 2020 at 12:37:33AM +, Hamish Moffatt wrote:

On 12/11/20 2:46 am, Thiago Macieira wrote:

NEVER calculate font sizes in pixels. Your design is wrong. Delete this
function and use point sizes throughout.

Too bad the Qt Widget stylesheet function only supports point sizes for
fonts.

Not sure what makes you think so:
https://doc.qt.io/qt-5/stylesheet-reference.html#font-prop
"The font size. In this version of Qt, only pt and px metrics are
supported."

What I meant was ONLY font sizes can be specified in points. Other 
dimensions (max-height for example) can't be specified in pt.



Hamish

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


Re: [Interest] Qt5 font size issue with fontconfig

2020-11-11 Thread Hamish Moffatt

On 12/11/20 2:46 am, Thiago Macieira wrote:


NEVER calculate font sizes in pixels. Your design is wrong. Delete this
function and use point sizes throughout.



Too bad the Qt Widget stylesheet function only supports point sizes for 
fonts. Points don't work for any other measurements,



Hamish

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


Re: [Interest] Qt Creator debugger does not flush "Application Output" on every log call?

2020-09-20 Thread Hamish Moffatt

On 21/9/20 6:13 am, David M. Cotter wrote:


Do you develop on mac?

Do you print stuff to console (qDebug) to aid with debugging?

When you hit a breakpoint, do you find that, quite often, your log 
hasn't been flushed? ie: you can't see the latest logging, the 
"Application Output" is stuck somewhere in the past...


Does this happen to you? Seems like a bug.

If this drives you nuts, please upvote this bug 
 i've filed. Thanks.




I haven't noticed this in Xcode, but I don't know why it would be Qt 
Creator specific...




Hamish

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


Re: [Interest] wss:// on localhost

2020-08-02 Thread Hamish Moffatt

On 3/8/20 9:05 am, Alexander Carôt wrote:

I repeat: whatever you do, don't ship a private key.

Allright - will consider alternative ideas.



Consider generating your own root CA certificate and asking your users 
to install that in their browser. Then sign the site certificate (for a 
non-existent, non-registerable domain) with that.



Hamish

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


Re: [Interest] qt 5.15.0 msvc 2019

2020-07-30 Thread Hamish Moffatt

Phillipe,

On 31/7/20 5:47 am, maitai wrote:

Hi all,

I am a bit confused with qt 5.15.0 on Windows.

The downloader proposes either MSVC2015 or MSVC2019, why not MSVC2017, 
mystery.


I chose 2019, and installed relevant MSVC/Visual basic suites.

All good, build ok, etc. Installer installs MSVC 2019 if missing, etc.

Then users start to complain about crashes (only on Windows 7), I said 
OK, let's go back to msvc2017/qt 5.14.2 for them.


And then finally digging more into it, I can see that using this 
version without changing a line in our code is much slower than qt 
5.14.2 (= 10 times slower in some specific cases)


Then I looked at options->qtVersions etc and qt 5.15.0(msvc 2019) 
wants msvc 2017 in fact (msvc version 15, if I try 16 this is not 
accepted).


What is the deal here? 



MSVC2017 and 2019 are binary compatible. Hence there are no more 2017 
builds as there is no need. We are actually using Qt 5.12 with 2019 here.


You can still use 2017, though maybe not from Qt Creator. We use Visual 
Studio rather than Creator. You might try that to work out if your 
issues are due to the compiler upgrade or to the Qt upgrade.



Hamish

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


Re: [Interest] how to use Qt debug libraries in Xcode

2020-07-23 Thread Hamish Moffatt

On 23/7/20 6:38 pm, Tor Arne Vestbø wrote:

Does your Qt install have the _debug version of the libraries? The binary SDK 
download nowadays is release only, but with separate debug info. If you need to 
debug Qt you may need to build it from source.



Thanks, I didn't know this (that page I linked must be out of date). 
Still, I have also tried with 5.12.7 which does have the _debug binaries 
in the frameworks and I have the same problem.



Hamish

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


[Interest] how to use Qt debug libraries in Xcode

2020-07-23 Thread Hamish Moffatt

Hi,

I need to run with the Qt debug libraries in Xcode in order to debug a 
weird problem I'm having side Qt.


https://doc.qt.io/qt-5/debug.html says to set DYLD_IMAGE_SUFFIX=_debug, 
but my attempts at this are not working.


In the Xcode project's run/debug scheme, DYLD_IMAGE_SUFFIX is already 
set to $(QT_LIBRARY_SUFFIX). I have changed it there to _debug but that 
didn't help. I have also tried setting QT_LIBRARY_SUFFIX when running 
qmake but that also did nothing.


What is the correct way to set this? I think I've had it working in the 
past but not since Qt 5.8 or so.



Hamish

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


Re: [Interest] [Development] Windows 7 support will be dropped in Qt 6

2020-06-11 Thread Hamish Moffatt

On 12/6/20 10:17 am, Scott Bloom wrote:

Why is Win7 being dropped?  I (my company) has gotten burned pretty hard by the 
dropping of CentOS 6, similar reasons listed for win7..


It's funny that there's so much discussion about dropping Windows 7 
which was released 11 years ago.


Yet Qt 5.15 already dropped macOS prior to 10.13, which is not even 3 
years old. And Qt trunk requires 10.14, which is only 2 years old. This 
is really a major PITA.



Hamish

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


Re: [Interest] how to get 3 pixel focus ring?

2020-06-09 Thread Hamish Moffatt

On 10/6/20 5:18 am, David M. Cotter wrote:

if you prefer forums with screen shots, see this forum post:
https://forum.qt.io/topic/105740/focus-ring-around-tree-table-views/33



It may be that the Qt Windows style is working hard to prevent you from 
doing this, because it's not common Windows style, as has been pointed 
out to you in the forum.



You could try setting the style of your application or at least the 
affected components to "fusion"; we have styled everything in our 
application using the stylesheet and use fusion as the base style on 
both Windows and Mac.


qApp->setStyle(QStyleFactory::create(QStringLiteral("fusion")));

justOneWidget->setStyle(QStyleFactory::create(QStringLiteral("fusion")));



Hamish



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


Re: [Interest] unexpected result from QString::compare

2020-05-11 Thread Hamish Moffatt

On 9/5/20 12:35 am, Thiago Macieira wrote:


On Friday, 8 May 2020 05:05:43 PDT Hamish Moffatt wrote:


localeAwareCompare() is working as expected.


Unfortunately, it doesn't allow the case sensitivity to be specified 
(unlike QCollator::compare() and QString::compare()), which makes it 
less useful than it could be.



Consider QCollator too.



Thanks, that solves my next problem of how to compare in locales other 
than the default.


I notice that QString::localeAwareCompare() internally uses a QCollator, 
which it defines as;


Q_GLOBAL_STATIC(QThreadStorage, defaultCollator)

Why does it need an instance per thread?



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


Re: [Interest] unexpected result from QString::compare

2020-05-08 Thread Hamish Moffatt

On 8/5/20 6:54 pm, Florian Bruhin wrote:


On Fri, May 08, 2020 at 08:51:19AM +, Hamish Moffatt wrote:

On 8/5/20 5:13 pm, Fabrice Mousset | GEOCEPT GmbH wrote:

Perhaps you should use QString::localeAwareCompare() ?


Thanks, I didn't know about that. Maybe the QString::compare() documentation
could mention it...

 From https://doc.qt.io/qt-5/qstring.html#compare :

   Case sensitive comparison is based exclusively on the numeric Unicode values
   of the characters and is very fast, but is not what a human would expect.
   Consider sorting user-visible strings with localeAwareCompare().

Oh thanks, I'm at 0/2 today it seems. I looked at the compare() overload 
I'm using and missed this reference further up.


localeAwareCompare() is working as expected.

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


Re: [Interest] unexpected result from QString::compare

2020-05-08 Thread Hamish Moffatt

On 8/5/20 5:13 pm, Fabrice Mousset | GEOCEPT GmbH wrote:

Perhaps you should use QString::localeAwareCompare() ?



Thanks, I didn't know about that. Maybe the QString::compare() 
documentation could mention it...



Hamish

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


[Interest] unexpected result from QString::compare

2020-05-08 Thread Hamish Moffatt
I'm trying to sort a list of strings where umlauts are involved, and not 
getting the answer I expect from QString::compare(). My sample code is:


        auto a = QStringLiteral("Äbc");
        auto b = QStringLiteral("BCD");
        auto c = a.compare(b);
        qDebug() << a << b << c;

This produces the output:

"Äbc" "BCD" 130

which indicates that Äbc should be sorted after "BCD".

I get the same result when I load the strings through QTranslator so I 
don't believe there's any editor/encoding issue going on.


I seem to get the right result when I let QListWidget sort the items for 
me though.



What am I missing?


thanks,

Hamish


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


Re: [Interest] [SPAM] build from source does not build qtsvg

2020-04-20 Thread Hamish Moffatt

On 21/4/20 9:23 am, Thiago Macieira wrote:

On Monday, 20 April 2020 14:28:45 PDT Hamish Moffatt wrote:

I did, initially. But qtsvg was being silently ignored and I couldn't
figure out why, so eventually I downloaded everything in case there was
a dependency on another module that I'd omitted.

So you're saying you downloaded qtsvg 5.14.2's .tar.gz, typed

   qmake
   make

and it did nothing?



No, I mean downloaded qt 5.12's .tar.gz, ran an out-of-tree configure 
and make, and it didn't build qtsvg. Same for 5.15.0 in git.


In-tree configure and build works though.


Hamish

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


Re: [Interest] [SPAM] build from source does not build qtsvg

2020-04-20 Thread Hamish Moffatt

On 21/4/20 1:56 am, Thiago Macieira wrote:

On Sunday, 19 April 2020 22:45:27 MDT Hamish Moffatt wrote:

  -skip qtactiveqt \

This incredibly long list of skips tells me you're doing something wrong.
Instead of opting out of everything you don't want, opt in to the things yuo
do. Just download and build each module independently and ignore the top-level
configure.



I did, initially. But qtsvg was being silently ignored and I couldn't 
figure out why, so eventually I downloaded everything in case there was 
a dependency on another module that I'd omitted.



Thanks,

Hamish

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


Re: [Interest] build from source does not build qtsvg

2020-04-20 Thread Hamish Moffatt

On 20/4/20 2:45 pm, Hamish Moffatt wrote:
I haven't built Qt5 from source in ages, but I need to test something 
on 5.15.


Everything builds OK, but QtSVG doesn't get built, and I can't figure 
out why. There's absolutely no mention of it in config.log. It seems 
to be just being ignored. It's listed in the makefile: 



It looks like QtSVG just gets ignored when you do an out of tree build. 
For an in-tree build, it's built just fine. QTBUG-83658.




Hamish

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


[Interest] [SPAM] build from source does not build qtsvg

2020-04-19 Thread Hamish Moffatt
Spam detection software, running on the system "mx.qt-project.org",
has identified this incoming email as possible spam.  The original
message has been attached to this so you can view it or label
similar future email.  If you have any questions, see
the administrator of that system for details.

Content preview:  I haven't built Qt5 from source in ages, but I need to test
   something on 5.15. Everything builds OK, but QtSVG doesn't get built, and
   I can't figure out why. There's absolutely no mention of it in config.log.
   It seems to be just being ignored. It's listed in the makefile: 

Content analysis details:   (5.1 points, 4.6 required)

 pts rule name  description
 -- --
 0.8 BAYES_50   BODY: Bayes spam probability is 40 to 60%
[score: 0.5000]
 0.0 SPF_HELO_NONE  SPF: HELO does not publish an SPF Record
 2.0 PDS_OTHER_BAD_TLD  Untrustworthy TLDs
[URI: qtsvg.pro (pro)]
 0.0 URIBL_BLOCKED  ADMINISTRATOR NOTICE: The query to URIBL was
blocked.  See

http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information.
[URIs: risingsoftware.com]
 2.3 FORGED_MUA_MOZILLA Forged mail pretending to be from Mozilla


--- Begin Message ---
I haven't built Qt5 from source in ages, but I need to test something on 
5.15.


Everything builds OK, but QtSVG doesn't get built, and I can't figure 
out why. There's absolutely no mention of it in config.log. It seems to 
be just being ignored. It's listed in the makefile:


SUBTARGETS    =  \
    module-qtbase \
    module-qtmacextras \
    module-qtimageformats \
    module-qtsvg \
    module-qtxmlpatterns \
    module-qttools \
    module-qtscript \
    module-qttranslations

module-qtsvg-qmake_all: module-qtbase-qmake_all FORCE
    @test -d qtsvg/ || mkdir -p qtsvg/
    cd qtsvg/ && $(QMAKE) -o Makefile 
/Users/hamish/dev/qt-build/qt5/qtsvg/qtsvg.pro

    cd qtsvg/ && $(MAKE) -f Makefile qmake_all
module-qtsvg: module-qtbase FORCE
    @test -d qtsvg/ || mkdir -p qtsvg/
    cd qtsvg/ && ( test -e Makefile || $(QMAKE) -o Makefile 
/Users/hamish/dev/qt-build/qt5/qtsvg/qtsvg.pro ) && $(MAKE) -f Makefile



etc, but there is no qtsvg directory created by configure, so the build 
doesn't do anything.



I'm using

./init-repository --module-subset=default,-qtwebengine,-qt3d

which does pull down qtsvg.


Then

../qt5/configure -developer-build -nomake examples -nomake tests \
    -I /Library/Frameworks/firebird.framework/Headers \
    -L /Library/Frameworks/firebird.framework/Libraries \
    -commercial -confirm-license \
    -skip qtactiveqt \
    -skip qtandroidextras \
    -skip qtcharts \
    -skip qtconnectivity \
    -skip qtdatavis3d \
    -skip qtdeclarative \
    -skip qtdoc \
    -skip qtgamepad \
    -skip qtgraphicaleffects \
    -skip qtlocation \
    -skip qtlottie \
    -skip qtnetworkauth \
    -skip qtpurchasing \
    -skip qtqa \
    -skip qtquick3d \
    -skip qtquickcontrols \
    -skip qtquickcontrols2 \
    -skip qtquicktimeline \
    -skip qtremoteobjects \
    -skip qtscxml \
    -skip qtsensors \
    -skip qtserialbus \
    -skip qtserialport \
    -skip qtspeech \
    -skip qtvirtualkeyboard \
    -skip qtwayland \
    -skip qtwebchannel \
    -skip qtwebglplugin \
    -skip qtwebsockets \
    -skip qtwebview \
    -skip qtwinextras \
    -skip qtx11extras \


Am I missing something? Is it a bug?


Hamish

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


[Interest] transaction modes in QtSql

2020-04-14 Thread Hamish Moffatt
Some database engines allow you to set properties of a database 
transaction, like read only versus read/write, isolation level etc.


It looks like in Postgres you would use an SQL command line like 'start 
transaction isolation level repeatable read;'. In Firebird/Interbase, 
you have to parse some extra parameters to the transaction API (not 
plain text).


I don't see any way to access this functionality from Qt though. Am I 
missing something?



Hamish

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


Re: [Interest] OSX codesign question

2020-04-09 Thread Hamish Moffatt

On 9/4/20 1:15 am, "Alexander Carôt" wrote:
So - I received the new certificate, installed it on my keychain tool 
and this is what happened again:
soulalex@alexandarotsMBP SJC % codesign --deep --force --verify 
--verbose --timestamp --options runtime --sign "Developer ID 
Application: Alexander Carot (92C65YCLK8)" ./soundjack.app
./soundjack.app: signed app bundle with Mach-O thin (x86_64) 
[com.yourcompany.soundjack]


soulalex@alexandarotsMBP SJC % codesign --verify --deep --strict 
--verbose=2 ./soundjack.app

./soundjack.app: valid on disk
./soundjack.app: satisfies its Designated Requirement

soulalex@alexandarotsMBP SJC % ./soundjack.app/Contents/MacOS/soundjack
dyld: Library not loaded: 
@rpath/QtMultimediaWidgets.framework/Versions/5/QtMultimediaWidgets
  Referenced from: 
/Users/soulalex/Desktop/wip/XP-shared/Soundjack/SJC/./soundjack.app/Contents/MacOS/soundjack

  Reason: no suitable image found.  Did find:
 /Users/soulalex/Qt-5.14.2/5.14.2/clang_64/lib/QtMultimediaWidgets.framework/Versions/5/QtMultimediaWidgets: 
code signature in 
(/Users/soulalex/Qt-5.14.2/5.14.2/clang_64/lib/QtMultimediaWidgets.framework/Versions/5/QtMultimediaWidgets) 
not valid for use in process using Library Validation: mapped file has 
no cdhash, completely unsigned? Code has to be at least ad-hoc signed.

zsh: abort  ./soundjack.app/Contents/MacOS/soundjack
soulalex@alexandarotsMBP SJC %
Any idea left ?



Is the QtMultimediaWidgets.framework included in your bundle? Are you 
using macdeployqt?


It looks like a signing error because it is trying your (unsigned) Qt 
development install framework instead, while maybe the problem is that 
the framework is just missing from your bundle and therefore didn't get 
signed.




Hamish

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


Re: [Interest] Qt Creator licensing for companies with Qt, Commercial developers

2020-04-01 Thread Hamish Moffatt

On 31/3/20 6:09 am, Roland Hughes wrote:
Just be aware that UltraEdit like many other PC originating editors 
gets tabs wrong. When you set tabs to spaces and set their width to 4, 
hitting  when cursor is in first column of the line has to put 
the cursor in column 4, not 5 like far too many PC editors. 



That's definitely not the right behaviour if you're coding Python for 
example, which is a far more likely scenario for a modern editor than COBOL.




Hamish

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


Re: [Interest] Qt5 connect signal to signal

2020-03-10 Thread Hamish Moffatt

On 10/3/20 7:04 pm, Johannes Lochmann wrote:

Hi Hamish,

Yes, you are right.
Link Tipp: https://wiki.qt.io/New_Signal_Slot_Syntax



Thanks Johannes,

Actually the SIGNAL to SIGNAL case does not seem to be covered in that 
article, which is why I asked. Did I miss it?



Hamish

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


[Interest] Qt5 connect signal to signal

2020-03-09 Thread Hamish Moffatt

In the old syntax one could:

connect(source, SIGNAL(readProgress(int)), SIGNAL(progress(int)));


In the new syntax, is it equivalent to use

connect(source, ::readProgress, this, ::progress);

... assuming that all of this is on a single thread?


I'm not quite clear what thread context the first is using when 
repeating the signal?



Hamish

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


Re: [Interest] Crash when creating QNetworkAccessManager in qt 5.14.x

2020-02-09 Thread Hamish Moffatt

On 7/2/20 2:21 am, maitai wrote:
I had somewhere an old directory "bearer" containing old dlls from 
5.9.1 and qt was loading those instead of 5.14.1 



Ugh, we used to have this problem all the time in the 5.6 days. It would 
be good if Qt were more fussy about loading plugins from mismatched 
versions


We stopped deploying the bearer plugins at all as we couldn't see any 
use for them.



Hamish

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


Re: [Interest] Mac OS - AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo crashes application

2020-01-09 Thread Hamish Moffatt

On 10/1/20 4:03 am, Nuno Santos wrote:

Hi,

I’m trying to setup camera usage permission request for 10.14 (Mojave) 
and 10.15 (Catalina). I have added the camera and microphone 
permissions in the Info.plist as in below:


NSCameraUsageDescription
This application uses the video camera to communicate with 
another endpoint.

NSMicrophoneUsageDescription
This application uses the microphone input to communicate with 
another endpoint.


But the app keeps crashing as soon as the permission code below is 
called when it should prompt for permissions:



Where does it crash? Can you post the stack trace?


Hamish

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


Re: [Interest] Qt Mac OS - App crashes when opening camera - Namespace TCC, Code 0x0

2019-12-17 Thread Hamish Moffatt

On 18/12/19 9:18 am, Nuno Santos wrote:

Hamish,

Thanks for your reply.

I’ve have .plist entries for camera and microphone already.

Can you point me which api call is necessary? Some keywords so that I can 
google faster?



I didn't write our code that does this, but I see the following calls 
(from Objective-C):


AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeAudio

AVCaptureDevice requestAccessForMediaType:AVMediaTypeAudio



cheers

Hamish

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


Re: [Interest] Qt Mac OS - App crashes when opening camera - Namespace TCC, Code 0x0

2019-12-17 Thread Hamish Moffatt

On 17/12/19 10:24 pm, Jason H wrote:

I've had this working before... But have not tried it on a recent version of 
Qt. You need a plist entry, which I thought is how you get the permission 
request. It's just like in iOS.

You need a plist entry, AND you need to call the API to request 
permission... if it's anything like microphone access, anyway.



Hamish

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


Re: [Interest] Tricks to improve moc performance?

2019-12-09 Thread Hamish Moffatt

On 10/12/19 9:14 am, Adam Light wrote:



When I previously analyzed the sampling data during a moc.exe run, it 
was clear that the vast majority of the time was spent satisfying the 
includes, and most of that was checking whether a concatenation of an 
include path and a file name are a valid file (eg. 
include/path1/stdio, include/path2/stdio, etc.). It seems like the 
compiler (cl.exe) would need to do essentially the same thing when 
compiling each individual file, but it's not nearly as slow as moc.



If my memory serves me correctly, we found MOC drastically slower when 
we upgraded from Qt 4.8 to 5.x. We had quite a few directories in 
INCLUDEPATH, though nothing like the number you mentioned.


To get acceptable performance we trimmed INCLUDEPATH to a higher level 
directory and started referencing  instead of just .



At development time we build in Visual Studio using the vcxproj 
generator in qmake, which won't run multiple MOC steps in paralle. If 
you think your MOC time is bad, imagine running them serially... We had 
to rewrite our build scripts to use JOM for release builds due to this.



Hamish

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


Re: [Interest] No access to MySql and MariaDB databases with Qt

2019-10-13 Thread Hamish Moffatt


On 11/10/19 10:22 pm, Marius Kittler wrote:

I tried to manually build the MySQL driver but failed because configure not
only looks for libmysql.* but also for a config.win32 (why).

I use the following patch for my builds: https://github.com/Martchus/
PKGBUILDs/blob/master/qt5-base/mingw-w64/0013-Fix-linking-against-shared-
static-MariaDB.patch

That works (the resulting package contains sqldrivers/qsqlmysql.dll).

Note that the PostgreSQL needed a similar patch in my case.

Welcome to the club. Qt has never included a compiled version of the 
IBASE driver, although I don't think the licence would prohibit it. 
Further, it always needs patching to link against Firebird instead of 
Interbase.



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


Re: [Interest] how to programmatically create QIcon for use with QToolButton?

2019-09-24 Thread Hamish Moffatt

On 24/9/19 3:23 pm, David M. Cotter wrote:


Does |QToolButton| use the normal / selected / disabled states of a 
|QIcon| that is programmatically created from |QPixmaps|? ie: when the 
user clicks in the |QToolButton|, shouldn't it show the "selected" 
icon variant? and when the window is deactivated, shouldn't it show 
the "disabled" state?


I can't for the life of me get the "selected" (pressed?) or "disabled" 
states to draw.


for the code i'm using see this forum post:
https://forum.qt.io/topic/107143/how-to-programmatically-create-qicon-for-use-with-qtoolbutton



Which style are you using? I had some problems with the Fusion style 
doing its own thing with my icons. I used a QProxyStyle derivative to 
stop it doing that.



Hamish

___
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] equivalent of python glob

2019-08-25 Thread Hamish Moffatt

On 24/8/19 12:38 am, Bob Hood wrote:

On 8/23/2019 12:46 AM, Hamish Moffatt wrote:

Hi,

In Python one can write the expression: glob.glob("/usr/bin/*") and 
get a list of such files. I am looking for something similar in Qt 
(in C++).


I have look at QDir::entryList() and entryInfoList(), but it seems I 
would have to extract the path first and provide it to QDir. I can't 
use QDir('/').entryList({ "/usr/bin/*" }), as it returns nothing.


Look at QDirIterator.

e.g., QDirIterator iter(base_folder, QStringList() << "*.*", 
QDir::Files, QDirIterator::Subdirectories);



But I am looking for a method where I don't have to separate the base 
folder. I want to accept user input like "/usr/bin/*" and list those 
files, but I haven't found a way to provide this path directly to Qt. It 
looks like I need to split off the path first.


QDirIterator behaves the same as QDir, which I tried originally as I 
wrote above. Here it is tested in Python:



>>> from PyQt5 import QtCore
>>> di=QtCore.QDirIterator("/", ["/usr/bin/*"])
>>>
>>> di.next()
''


On a related note, where is the equivalent of os.path.join()?


thanks

Hamish

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


[Interest] equivalent of python glob

2019-08-23 Thread Hamish Moffatt

Hi,

In Python one can write the expression: glob.glob("/usr/bin/*") and get 
a list of such files. I am looking for something similar in Qt (in C++).


I have look at QDir::entryList() and entryInfoList(), but it seems I 
would have to extract the path first and provide it to QDir. I can't use 
QDir('/').entryList({ "/usr/bin/*" }), as it returns nothing.



Does anyone have a recipe?



Thanks

Hamish


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


Re: [Interest] Qt free software policy

2019-08-18 Thread Hamish Moffatt

On 15/8/19 6:28 am, Thiago Macieira wrote:
PS: Qt 5.12 will switch to OpenSSL 1.1 in the binary builds. 



Indeed 5.12.4 already did.



Hamish

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


Re: [Interest] [SPAM] Is it safe to call qRegisterMetaType() before main()?

2019-07-23 Thread Hamish Moffatt

On 24/7/19 9:45 am, Hamish Moffatt wrote:

On 24/7/19 12:27 am, Nikos Chantziaras wrote:
Ugh. Having the call happen on every object creation sounds even 
uglier. It seems it's best to roll our own. Probably a lazily 
initialized global static object that you can add functors to before 
main() and then run all functors of that object in main(). 



Kind of like Q_COREAPP_STARTUP_FUNCTION that I mentioned?



Sorry, just saw your other post about these being easy to forget (it was 
flagged as spam again).


You originally wrote:

/In order to avoid calling qRegisterMetaType() in main() (with the 
possibility of forgetting to do so,) I instead call it before the 
program enters main(), in the implementation file of whoever is the 
owner of the type. There's several ways to do this, I just use a lambda: /



Isn't that just as easy to forget?


Anyway I guess the question has been answered.


cheers

Hamish

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


Re: [Interest] [SPAM] Is it safe to call qRegisterMetaType() before main()?

2019-07-23 Thread Hamish Moffatt

On 24/7/19 12:27 am, Nikos Chantziaras wrote:
Ugh. Having the call happen on every object creation sounds even 
uglier. It seems it's best to roll our own. Probably a lazily 
initialized global static object that you can add functors to before 
main() and then run all functors of that object in main(). 



Kind of like Q_COREAPP_STARTUP_FUNCTION that I mentioned?


Hamish

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


Re: [Interest] [SPAM] Is it safe to call qRegisterMetaType() before main()?

2019-07-22 Thread Hamish Moffatt

On 22/7/19 10:56 pm, Nikos Chantziaras wrote:
In order to avoid calling qRegisterMetaType() in main() (with the 
possibility of forgetting to do so,) I instead call it before the 
program enters main(), in the implementation file of whoever is the 
owner of the type. There's several ways to do this, I just use a lambda:


namespace {
char unused = [] {
    qRegisterMetaType();
    return 0;
}();
}

It "seems to work fine," but is this safe though?



Why not put them in a static function in each file, and use 
Q_COREAPP_STARTUP_FUNCTION to have Qt call it for you at the right time?




Hamish

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


Re: [Interest] Q_ATOMIC_INT64_IS_SUPPORTED: Qt Compile errors on macOS

2019-06-26 Thread Hamish Moffatt

On 25/6/19 7:28 pm, Christian Kandeler wrote:

On Mon, 24 Jun 2019 23:25:38 +
Hamish Moffatt  wrote:


On 25/6/19 8:46 am, Thiago Macieira wrote:

On Monday, 24 June 2019 08:24:25 PDT Thiago Macieira wrote:

Anyway, let's stop speculating. Until we can reliably reproduce this problem
to understand what's going on, we're shooting in the dark.

I managed to reproduce this once. It was a left-over .qmake.stash file up in
the directory tree that was telling qmake to use an SDK version that was no
longer installed. I don't know how that file got created...


I also had problems with a stale SDK version in .qmake.stash when I
first upgraded to Qt 5.12. https://bugreports.qt.io/browse/QTBUG-71620

Despite this being entirely qmake's problem it was closed as invalid.

"Out of scope", actually.



My point was that the file is entirely managed by qmake, so (IMHO) qmake 
should deal with it if the data is now stale.



Hamish

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


Re: [Interest] Q_ATOMIC_INT64_IS_SUPPORTED: Qt Compile errors on macOS

2019-06-24 Thread Hamish Moffatt

On 25/6/19 8:46 am, Thiago Macieira wrote:

On Monday, 24 June 2019 08:24:25 PDT Thiago Macieira wrote:

Anyway, let's stop speculating. Until we can reliably reproduce this problem
to understand what's going on, we're shooting in the dark.

I managed to reproduce this once. It was a left-over .qmake.stash file up in
the directory tree that was telling qmake to use an SDK version that was no
longer installed. I don't know how that file got created...

I also had problems with a stale SDK version in .qmake.stash when I 
first upgraded to Qt 5.12. https://bugreports.qt.io/browse/QTBUG-71620


Despite this being entirely qmake's problem it was closed as invalid.


Hamish

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


Re: [Interest] notarizing builds for Mac - enabling hardened runtime

2019-06-21 Thread Hamish Moffatt

On 21/6/19 9:13 pm, Elvis Stansvik wrote:
Den fre 21 juni 2019 09:13Kai Köhne > skrev:



For the time being, it seems you've to execute the codesign call
yourself.


This is what I've done at work to prepare our builds for this. We use 
CMake though and we're already running codesign manually.


Great, we are already running codesign ourselves (as we add some other 
frameworks post-macdeployqt), so adding the extra parameter is no big deal.





The notarization is annoying and takes around 5 minutes for Apple to 
run their virus scanners or whatever they're doing, so at the moment 
we're doing it only on Git-tagged CI builds (releases), not on every 
commit. What this gives us currently is that the macOS "do you want to 
run this" prompt will say "Was scanned by Apple on blah blah and found 
to look good" or something.


Will be more annoying if/when macOS starts to demand notarized builds, 
because then we'd need to do notarization of every commit, or force 
testers that wants to test a random build to turn off that checking 
(which I assume is still going to be possible through System Preferences).



https://developer.apple.com/documentation/security/notarizing_your_app_before_distribution 
says that it will be required on 10.15. Hopefully this will be easy to 
disable for our testers as we don't want to notarize the daily builds. 
Otherwise are uploading half a Gb of packages and then waiting for them 
to be checked each time.


Do you know if it's sufficient to notarize the final .dmg or .pkg, or do 
you have to separately notarize and staple the .app before it is 
packaged? I haven't been able to find a good answer yet. But the Apple 
check is complaining about files inside my .app inside my .pkg, so I 
guess it will be sufficient to do the final .pkg.



Hamish

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


[Interest] notarizing builds for Mac - enabling hardened runtime

2019-06-21 Thread Hamish Moffatt
Apple says that all apps will need to be notarized (viewed) by them to 
be run on macOS 10.15 once released.


Apps must have the hardened runtime enabled in Xcode before they can be 
notarized.


Is there any way to get qmake to enable that project option?


Hamish

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


Re: [Interest] Online doc URL improvement

2019-06-07 Thread Hamish Moffatt

On 7/6/19 9:58 am, Sze Howe Koh wrote:

On Thu, 6 Jun 2019 at 10:09, Christian Gagneraud  wrote:

Hi there,

I quite often read the documentation online, b/c the urls are quite
short and simple i usually type them in directly in the URL bar.

I also use the online docs a lot, but I rarely edit the URL.

Instead, I use the Qt Doc Search browser extension for Chrome/Firefox:
https://forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches
(Disclaimer: I wrote this extension)

I activate the URL bar and type [q] + [d] + [space] +  + [Enter]

If Google's "I'm Feeling Lucky" or DuckDuckGo's "Ducky" are enabled,
you'll be taken straight to the class reference page.


How is viewing the documentation online easier than using Qt Assistant?



Hamishj

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


Re: [Interest] known issues with QFontDatabase::addApplicationFontFromData in Qt/Mac 5.9?

2019-05-26 Thread Hamish Moffatt

On 24/5/19 6:35 pm, René J.V. Bertin wrote:

Hi,

Is there a known issue when using QFDb::addApplicationFontFromData() or 
QFDb::addApplicationFont() with an embedded resource path in Qt 5.9 on Mac? I'm 
getting a crash; as far as I can tell the CTFontRef creation from the font data 
succeeds but the CoreText call to fetch the font description crashes, 
comparable to what happens here except that I can reproduce it by loading font 
data through the UI):



I remember that adding fonts from resources didn't work for us in 5.8 on 
Mac. We had to ship the fonts in our bundle instead. I didn't check if 
it was fixed in a later version.



Hamish

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


Re: [Interest] My first 5 years with Qt and 2 suggestions

2019-05-12 Thread Hamish Moffatt

On 11/5/19 6:49 am, Richard Weickelt wrote:

On 10.05.2019 21:13, Thiago Macieira wrote:

On Thursday, 9 May 2019 16:58:47 PDT Hamish Moffatt wrote:

For my use I rebuilt the Qt packages from https://launchpad.net/~beineri
for stretch; they install into /opt rather than replacing the system
packages, so you don't have the issues with Qt and other
reverse-dependencies. I think the Qt project could supply packages along
these lines, rather than trying to replace the system Qt.

Why can't you install the binaries published by the Qt Project in /opt?

You mean https://www.qt.io/offline-installers ?
You may want to try to install them:
- in a headless environment in a script
- to another location than /opt/Qt/xxx
- with only some components included



Headless is the show-stopper for me. "apt-get install qt512base qt512svg 
" is so easy, and it fetches all the necessary files too.



Hamish

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


Re: [Interest] My first 5 years with Qt and 2 suggestions

2019-05-09 Thread Hamish Moffatt

On 10/5/19 9:42 am, Lisandro Damián Nicanor Pérez Meyer wrote:


With my Debian maintainer hat on: thanks for this. But I also have to say that
we (Debian) currently lack certain infrastructure that would allow us to
provide semi-official packages, like PPAs.

It is normally not to difficult to backport Qt (except form buster to stretch,
due to some changes done to allow [cross] building starting from system
packages). If Debian had PPA-like infra I would certainly try to get a more or
less decent backport around (would break KDE and other stuff though, due to
API breakage in private API).



For my use I rebuilt the Qt packages from https://launchpad.net/~beineri 
for stretch; they install into /opt rather than replacing the system 
packages, so you don't have the issues with Qt and other 
reverse-dependencies. I think the Qt project could supply packages along 
these lines, rather than trying to replace the system Qt.




Hamish (ex-debian developer)

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


Re: [Interest] My first 5 years with Qt and 2 suggestions

2019-05-09 Thread Hamish Moffatt

On 9/5/19 6:04 pm, Shawn Rutledge wrote:
Of course on Linux there are usually distro packages so it’s already 
easy (as long as you don’t mind them often being a bit outdated: shame 
on distros who still didn’t upgrade to 5.12 yet). And macOS has brew.



Actually, I'd turn this around and say shame on the Qt project for not 
publishing packages, at least for the major distributions.


It's Debian's policy to publish stable releases which don't change 
except for security and other essential updates. There is no argument 
for updating Qt in a stable release.


If Qt wants to get updates out to developers on Debian and Ubuntu it can 
publish its own packages.



There are third party packages available for Ubuntu which I have rebuilt 
for my Debian systems here, as I needed a newer version than 5.7 on my 
Debian stable systems.



Hamish


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


  1   2   3   >