QApplication app(argc, argv);
#ifndef NO_K_LIB
- KLocalizedString::setApplicationDomain(AboutData::ShortName);
+ KLocalizedString::setApplicationDomain(AboutData::ShortName.toStdString().c_str());
const auto LicenseType = KAboutLicense::LGPL;
#ifdef NO_K_LIB
#include "noklib.h"
#include <ui_mainwindow_noklib.h>
-#include "aboutdialog.h"
#include <QAbstractButton>
#include <QFileDialog>
#else
#include <KStandardAction>
#endif
+#include "aboutdata.h"
+#include "aboutdialog.h"
#include "util.h"
#include <QAction>
#include "histogrammodel.h"
#include "histogramwidget.h"
#if QWT_FOUND
-#include "aboutdata.h"
#include <QSettings>
#endif
#endif
});
}
#endif // USE_CHART
-#ifdef NO_K_LIB
+
connect(m_ui->aboutAction, &QAction::triggered, this, &MainWindow::about);
-#endif
auto costDelegate = new CostDelegate(this);
emit clearData();
}
+void MainWindow::about()
+{
+ AboutDialog dlg(this);
+ dlg.exec();
+}
+
void MainWindow::showError(const QString& message)
{
m_ui->messages->setText(message);
{
selectFile(this, m_ui->compareToEdit);
}
-
-void MainWindow::about()
-{
- AboutDialog dlg(this);
- dlg.exec();
-}
#endif
#ifdef QWT_FOUND
void loadFile(const QString& path, const QString& diffBase = {});
void openNewFile();
void closeFile();
+ void about();
signals:
void clearData();
public slots:
void selectOpenFile();
void selectCompareToFile();
- void about();
#endif
#ifdef QWT_FOUND
protected:
</property>
</widget>
<addaction name="menu_File"/>
+ <widget class="QMenu" name="menu_Help">
+ <property name="title">
+ <string>&Help</string>
+ </property>
+ <addaction name="aboutAction"/>
+ </widget>
+ <addaction name="menu_File"/>
+ <addaction name="menu_Help"/>
</widget>
+ <action name="aboutAction">
+ <property name="text">
+ <string>&About</string>
+ </property>
+ </action>
</widget>
<customwidgets>
<customwidget>
SOURCES += \
analyze/accumulatedtracedata.cpp \
analyze/gui/aboutdata.cpp \
+ analyze/gui/aboutdialog.cpp \
analyze/gui/gui.cpp \
analyze/gui/callercalleemodel.cpp \
analyze/gui/costdelegate.cpp \
HEADERS += \
analyze/accumulatedtracedata.h \
analyze/gui/aboutdata.h \
+ analyze/gui/aboutdialog.h \
analyze/gui/callercalleemodel.h \
analyze/gui/costdelegate.h \
analyze/gui/flamegraph.h \
NO_K_LIB {
HEADERS += \
- analyze/gui/noklib.h \
- analyze/gui/aboutdialog.h
-
- SOURCES += \
- analyze/gui/aboutdialog.cpp
+ analyze/gui/noklib.h
FORMS += \
analyze/gui/mainwindow_noklib.ui \