QSaveFile.open( QIODevice::Append ) not work
Posted: Thu Mar 16 2023 7:25 am
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.
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.