+ m_actionHandler(0),
+ m_remoteEncoding(0),
+ m_settingsDialog(),
+ m_controlButton(0),
+ m_updateToolBarTimer(0),
+ m_lastHandleUrlStatJob(0),
+ m_terminalPanel(0),
+ m_placesPanel(0),
+ m_tearDownFromPlacesRequested(false)
+{
+ Q_INIT_RESOURCE(dolphin);
+
+ setObjectName(QStringLiteral("Dolphin#"));
+
+ connect(&DolphinNewFileMenuObserver::instance(), &DolphinNewFileMenuObserver::errorMessage,
+ this, &DolphinMainWindow::showErrorMessage);
+
+ KIO::FileUndoManager* undoManager = KIO::FileUndoManager::self();
+ undoManager->setUiInterface(new UndoUiInterface());
+
+ connect(undoManager, static_cast<void(KIO::FileUndoManager::*)(bool)>(&KIO::FileUndoManager::undoAvailable),
+ this, &DolphinMainWindow::slotUndoAvailable);
+ connect(undoManager, &KIO::FileUndoManager::undoTextChanged,
+ this, &DolphinMainWindow::slotUndoTextChanged);
+ connect(undoManager, &KIO::FileUndoManager::jobRecordingStarted,
+ this, &DolphinMainWindow::clearStatusBar);
+ connect(undoManager, &KIO::FileUndoManager::jobRecordingFinished,
+ this, &DolphinMainWindow::showCommand);
+
+ GeneralSettings* generalSettings = GeneralSettings::self();
+ const bool firstRun = (generalSettings->version() < 200);
+ if (firstRun) {
+ generalSettings->setViewPropsTimestamp(QDateTime::currentDateTime());
+ }
+
+ setAcceptDrops(true);
+
+ m_tabWidget = new DolphinTabWidget(this);
+ m_tabWidget->setObjectName("tabWidget");
+ connect(m_tabWidget, &DolphinTabWidget::activeViewChanged,
+ this, &DolphinMainWindow::activeViewChanged);
+ connect(m_tabWidget, &DolphinTabWidget::tabCountChanged,
+ this, &DolphinMainWindow::tabCountChanged);
+ connect(m_tabWidget, &DolphinTabWidget::currentUrlChanged,
+ this, &DolphinMainWindow::setUrlAsCaption);
+ setCentralWidget(m_tabWidget);
+
+ setupActions();
+
+ m_actionHandler = new DolphinViewActionHandler(actionCollection(), this);
+ connect(m_actionHandler, &DolphinViewActionHandler::actionBeingHandled, this, &DolphinMainWindow::clearStatusBar);
+ connect(m_actionHandler, &DolphinViewActionHandler::createDirectory, this, &DolphinMainWindow::createDirectory);
+
+ m_remoteEncoding = new DolphinRemoteEncoding(this, m_actionHandler);
+ connect(this, &DolphinMainWindow::urlChanged,
+ m_remoteEncoding, &DolphinRemoteEncoding::slotAboutToOpenUrl);
+
+ setupDockWidgets();