]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.cpp
Don't set Qt::WindowContextHelpButtonHint on Windows as it basically converts the...
[dolphin.git] / src / dolphinmainwindow.cpp
index 5f7a8e72801148d8262c3fda6b2d24e84d4ef5cb..83dcd1b18eaa00ccd9d40ed00966f62b7d69eedf 100644 (file)
@@ -96,7 +96,7 @@ namespace {
 }
 
 DolphinMainWindow::DolphinMainWindow() :
-    KXmlGuiWindow(nullptr, Qt::WindowContextHelpButtonHint),
+    KXmlGuiWindow(nullptr),
     m_newFileMenu(nullptr),
     m_helpMenu(nullptr),
     m_tabWidget(nullptr),
@@ -115,6 +115,9 @@ DolphinMainWindow::DolphinMainWindow() :
     m_forwardAction(nullptr)
 {
     Q_INIT_RESOURCE(dolphin);
+#ifndef Q_OS_WIN
+       setWindowFlags(Qt::WindowContextHelpButtonHint);
+#endif
     setComponentName(QStringLiteral("dolphin"), QGuiApplication::applicationDisplayName());
     setObjectName(QStringLiteral("Dolphin#"));
 
@@ -514,7 +517,7 @@ void DolphinMainWindow::closeEvent(QCloseEvent* event)
         }
     }
 
-    if (m_terminalPanel->hasProgramRunning() && GeneralSettings::confirmClosingTerminalRunningProgram() && closedByUser) {
+    if (m_terminalPanel && m_terminalPanel->hasProgramRunning() && GeneralSettings::confirmClosingTerminalRunningProgram() && closedByUser) {
         // Ask if the user really wants to quit Dolphin with a program that is still running in the Terminal panel
         // Open a confirmation dialog with 3 buttons:
         // QDialogButtonBox::Yes    -> Quit
@@ -1189,7 +1192,7 @@ void DolphinMainWindow::updateWindowTitle()
 
 void DolphinMainWindow::slotStorageTearDownFromPlacesRequested(const QString& mountPath)
 {
-    if (m_terminalPanel->currentWorkingDirectory().startsWith(mountPath)) {
+    if (m_terminalPanel && m_terminalPanel->currentWorkingDirectory().startsWith(mountPath)) {
         m_tearDownFromPlacesRequested = true;
         m_terminalPanel->goHome();
         // m_placesPanel->proceedWithTearDown() will be called in slotTerminalDirectoryChanged
@@ -1200,7 +1203,7 @@ void DolphinMainWindow::slotStorageTearDownFromPlacesRequested(const QString& mo
 
 void DolphinMainWindow::slotStorageTearDownExternallyRequested(const QString& mountPath)
 {
-    if (m_terminalPanel->currentWorkingDirectory().startsWith(mountPath)) {
+    if (m_terminalPanel && m_terminalPanel->currentWorkingDirectory().startsWith(mountPath)) {
         m_tearDownFromPlacesRequested = false;
         m_terminalPanel->goHome();
     }