3 Commits

Author SHA1 Message Date
G.K.MacGregor
2da8da8c8e Tag version 0.5.2-alpha 2021-12-28 12:33:58 +00:00
G.K.MacGregor
c2057e979d Fix SC incorrectly saved as hexadecimal 2021-12-28 12:22:29 +00:00
G.K.MacGregor
f5402d216a Show filename when asking about unsaved changes 2021-12-14 22:06:18 +00:00
3 changed files with 4 additions and 4 deletions

View File

@@ -437,7 +437,7 @@ void saveTTI(QSaveFile &file, const TeletextDocument &document)
for (p=0; p<document.numberOfSubPages(); p++) {
// Page number
outStream << QString("PN,%1%2").arg(document.pageNumber(), 3, 16, QChar('0')).arg(subPageNumber & 0xff, 2, 16, QChar('0'));
outStream << QString("PN,%1%2").arg(document.pageNumber(), 3, 16, QChar('0')).arg(subPageNumber & 0xff, 2, 10, QChar('0'));
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
outStream << Qt::endl;
#else
@@ -447,7 +447,7 @@ void saveTTI(QSaveFile &file, const TeletextDocument &document)
// Subpage
// Magazine Organisation Table and Magazine Inventory Page don't have subpages
if (document.pageFunction() != TeletextDocument::PFMOT && document.pageFunction() != TeletextDocument::PFMIP) {
outStream << QString("SC,%1").arg(subPageNumber, 4, 16, QChar('0'));
outStream << QString("SC,%1").arg(subPageNumber, 4, 10, QChar('0'));
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
outStream << Qt::endl;
#else

View File

@@ -30,7 +30,7 @@ int main(int argc, char *argv[])
QApplication::setApplicationDisplayName(QApplication::applicationName());
QApplication::setOrganizationName("gkmac.co.uk");
QApplication::setOrganizationDomain("gkmac.co.uk");
QApplication::setApplicationVersion("0.5.1-alpha");
QApplication::setApplicationVersion("0.5.2-alpha");
QCommandLineParser parser;
parser.setApplicationDescription(QApplication::applicationName());
parser.addHelpOption();

View File

@@ -865,7 +865,7 @@ bool MainWindow::maybeSave()
{
if (m_textWidget->document()->undoStack()->isClean())
return true;
const QMessageBox::StandardButton ret = QMessageBox::warning(this, QApplication::applicationDisplayName(), tr("The document has been modified.\nDo you want to save your changes?"), QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
const QMessageBox::StandardButton ret = QMessageBox::warning(this, QApplication::applicationDisplayName(), tr("The document \"%1\" has been modified.\nDo you want to save your changes or discard them?").arg(QFileInfo(m_curFile).fileName()), QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
switch (ret) {
case QMessageBox::Save:
return save();