minor Linux fixes
authorAlexey Chernobaev <achernobaev@dev.rtsoft.ru>
Wed, 28 Mar 2018 18:34:35 +0000 (21:34 +0300)
committerAlexey Chernobaev <achernobaev@dev.rtsoft.ru>
Wed, 28 Mar 2018 18:34:35 +0000 (21:34 +0300)
src/analyze/gui/gui.cpp
src/analyze/gui/mainwindow.cpp
src/analyze/gui/mainwindow.h
src/analyze/gui/mainwindow.ui
src/heaptrack_gui.pro

index aebab59..5716c28 100644 (file)
@@ -37,7 +37,7 @@ int main(int argc, char** argv)
     QApplication app(argc, argv);
 
 #ifndef NO_K_LIB
-    KLocalizedString::setApplicationDomain(AboutData::ShortName);
+    KLocalizedString::setApplicationDomain(AboutData::ShortName.toStdString().c_str());
 
     const auto LicenseType = KAboutLicense::LGPL;
 
index 77cd1b8..0b99bd7 100644 (file)
@@ -23,7 +23,6 @@
 #ifdef NO_K_LIB
 #include "noklib.h"
 #include <ui_mainwindow_noklib.h>
-#include "aboutdialog.h"
 #include <QAbstractButton>
 #include <QFileDialog>
 #else
@@ -34,6 +33,8 @@
 #include <KStandardAction>
 #endif
 
+#include "aboutdata.h"
+#include "aboutdialog.h"
 #include "util.h"
 
 #include <QAction>
@@ -64,7 +65,6 @@
 #include "histogrammodel.h"
 #include "histogramwidget.h"
 #if QWT_FOUND
-#include "aboutdata.h"
 #include <QSettings>
 #endif
 #endif
@@ -501,9 +501,8 @@ MainWindow::MainWindow(QWidget* parent)
                 });
     }
 #endif // USE_CHART
-#ifdef NO_K_LIB
+
     connect(m_ui->aboutAction, &QAction::triggered, this, &MainWindow::about);
-#endif
 
     auto costDelegate = new CostDelegate(this);
 
@@ -684,6 +683,12 @@ void MainWindow::closeFile()
     emit clearData();
 }
 
+void MainWindow::about()
+{
+    AboutDialog dlg(this);
+    dlg.exec();
+}
+
 void MainWindow::showError(const QString& message)
 {
     m_ui->messages->setText(message);
@@ -784,12 +789,6 @@ void MainWindow::selectCompareToFile()
 {
     selectFile(this, m_ui->compareToEdit);
 }
-
-void MainWindow::about()
-{
-    AboutDialog dlg(this);
-    dlg.exec();
-}
 #endif
 
 #ifdef QWT_FOUND
index ff66862..63d87e7 100644 (file)
@@ -46,6 +46,7 @@ public slots:
     void loadFile(const QString& path, const QString& diffBase = {});
     void openNewFile();
     void closeFile();
+    void about();
 
 signals:
     void clearData();
@@ -56,7 +57,6 @@ protected:
 public slots:
     void selectOpenFile();
     void selectCompareToFile();
-    void about();
 #endif
 #ifdef QWT_FOUND
 protected:
index 4f289c8..7d74135 100644 (file)
     </property>
    </widget>
    <addaction name="menu_File"/>
+   <widget class="QMenu" name="menu_Help">
+    <property name="title">
+     <string>&amp;Help</string>
+    </property>
+    <addaction name="aboutAction"/>
+   </widget>
+   <addaction name="menu_File"/>
+   <addaction name="menu_Help"/>
   </widget>
+  <action name="aboutAction">
+   <property name="text">
+    <string>&amp;About</string>
+   </property>
+  </action>
  </widget>
  <customwidgets>
   <customwidget>
index 2a65405..13c7e47 100644 (file)
@@ -54,6 +54,7 @@ unix {
 SOURCES += \
     analyze/accumulatedtracedata.cpp \
     analyze/gui/aboutdata.cpp \
+    analyze/gui/aboutdialog.cpp \
     analyze/gui/gui.cpp \
     analyze/gui/callercalleemodel.cpp \
     analyze/gui/costdelegate.cpp \
@@ -71,6 +72,7 @@ SOURCES += \
 HEADERS += \
     analyze/accumulatedtracedata.h \
     analyze/gui/aboutdata.h \
+    analyze/gui/aboutdialog.h \
     analyze/gui/callercalleemodel.h \
     analyze/gui/costdelegate.h \
     analyze/gui/flamegraph.h \
@@ -147,11 +149,7 @@ USE_CHART {
 
 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 \