Page 1 of 1

QSaveFile.open( QIODevice::Append ) not work

Posted: Thu Mar 16 2023 7:25 am
by Navadvipa Chandra d
Hello, All!

void PrabhupadaLog( const QString &AFileName, const QString &msg )
{
QSaveFile ASaveFile = QSaveFile( AFileName );
QDataStream AStream = QDataStream( &ASaveFile );
ASaveFile.open( QIODevice::WriteOnly ); // work

QString S = QDateTime::currentDateTime().toString( "dd/MM/yyyy hh:mm:ss " ) + msg + "\n";
AStream << S;

ASaveFile.commit();
}

This work good, but inappropriate for a log file.

ASaveFile.open( QIODevice::Append ); // not work
ASaveFile.open( QIODevice::Text | QIODevice::WriteOnly | QIODevice::Append ); // not work
ASaveFile.open( QIODevice::Text | QIODevice::Append ); // not work

Windows 11
C:\mingw64\bin>"g++.exe" --version g++.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 7.3.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I can build only the release version on this old compiler, the Debug version is not going to! The only way to debug is using QMessageBox. I would also like to debug programs using the LOG file. In general, it would be nice if you screwed an editor to Cssdesigner, at least the same Diamond and screwed a debugger! Thank you for fixing Cs designer when working with QToolBar!

And one more very, very big request! When will it be possible to use ps 12.0 or higher under Windows? I looked that on Linux CopperSpice already works with the gcc compiler version 11. I installed this version on Windows, but compilation was impossible. Actually, it's a mystery to me.

Thank you!

With best regards, Navadvipa Chandra das.

Re: QSaveFile.open( QIODevice::Append ) not work

Posted: Mon Mar 20 2023 5:50 pm
by barbara
And one more very, very big request! When will it be possible to use ps 12.0 or higher under Windows? I looked that on Linux CopperSpice already works with the gcc compiler version 11. I installed this version on Windows, but compilation was impossible. Actually, it's a mystery to me.
There are a few versions of MinGW however most of them were not built using the vendor source code. Our only decent choice is to provide a pre-built version and it has not been an easy task to figure out the process for building MinGW and the necessary tools.

Thankfully, in early March we found another C++ developer who had the magic answers. We are in finally testing for MinGW 10. Since this was a boot strap process moving forward for 11 and 12 will not require much effort. Our team will be posting something within the next few weeks.

Barbara

Re: QSaveFile.open( QIODevice::Append ) not work

Posted: Wed Apr 05 2023 5:43 pm
by barbara
As of today we are releasing a version of MinGW 10 that was built directly from source. In addition most of the necessary POSIX utilities have been built using the upstream source code.

https://github.com/copperspice/cs_mingw_w64