From 1be5920a64f564ce5d82dcdb890cac01a4277aef Mon Sep 17 00:00:00 2001 From: Arin Alex Date: Mon, 27 Aug 2018 17:44:33 +0300 Subject: [PATCH] Showing the report name in the title fixed --- common.pri | 2 +- limereport/lrreportdesignwindow.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/common.pri b/common.pri index ef17042..b048dde 100644 --- a/common.pri +++ b/common.pri @@ -75,7 +75,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 4 -LIMEREPORT_VERSION_RELEASE = 100 +LIMEREPORT_VERSION_RELEASE = 102 LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"' DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\" diff --git a/limereport/lrreportdesignwindow.cpp b/limereport/lrreportdesignwindow.cpp index cffe165..2020c0b 100644 --- a/limereport/lrreportdesignwindow.cpp +++ b/limereport/lrreportdesignwindow.cpp @@ -78,7 +78,10 @@ ReportDesignWindow::ReportDesignWindow(ReportEnginePrivate *report, QWidget *par m_lblReportName = new QLabel(report->reportFileName(),this); m_statusBar->insertWidget(0,m_lblReportName); setStatusBar(m_statusBar); - setWindowTitle("Lime Report Designer"); + QString windowTitle = "Lime Report Designer"; + if (!report->reportName().isEmpty()) + windowTitle = report->reportName() + " - " + windowTitle; + setWindowTitle(windowTitle); restoreSetting(); m_hideLeftPanel->setChecked(isDockAreaVisible(Qt::LeftDockWidgetArea)); m_hideRightPanel->setChecked(isDockAreaVisible(Qt::RightDockWidgetArea)); @@ -742,6 +745,7 @@ void ReportDesignWindow::slotNewReport() m_lblReportName->setText(""); startNewReport(); m_deletePageAction->setEnabled(false); + setWindowTitle("Lime Report Designer"); } } @@ -931,7 +935,6 @@ void ReportDesignWindow::slotLoadReport() m_lblReportName->setText(fileName); m_propertyModel->setObject(0); updateRedoUndo(); - setWindowTitle(m_reportDesignWidget->report()->reportName() + " - Lime Report Designer"); if (!m_recentFiles.contains(fileName)){ if (m_recentFiles.count()==10){ QMap::const_iterator it = m_recentFiles.constBegin();