diff options
Diffstat (limited to 'src/mainwin.cc')
-rw-r--r-- | src/mainwin.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mainwin.cc b/src/mainwin.cc index da3501d..9b490c7 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -53,6 +53,7 @@ #ifdef Q_OS_MAC #include "CocoaUtils.h" #endif +#include "PlatformUtils.h" #include <QMenu> #include <QTime> @@ -227,6 +228,7 @@ MainWindow::MainWindow(const QString &filename) connect(this->fileActionSaveAs, SIGNAL(triggered()), this, SLOT(actionSaveAs())); connect(this->fileActionReload, SIGNAL(triggered()), this, SLOT(actionReload())); connect(this->fileActionQuit, SIGNAL(triggered()), this, SLOT(quit())); + connect(this->fileShowLibraryFolder, SIGNAL(triggered()), this, SLOT(actionShowLibraryFolder())); #ifndef __APPLE__ QList<QKeySequence> shortcuts = this->fileActionSave->shortcuts(); shortcuts.push_back(QKeySequence(Qt::Key_F2)); @@ -951,6 +953,11 @@ void MainWindow::actionSaveAs() } } +void MainWindow::actionShowLibraryFolder() +{ + QDesktopServices::openUrl(QUrl::fromLocalFile(QString::fromStdString(PlatformUtils::libraryPath()))); +} + void MainWindow::actionReload() { if (checkEditorModified()) refreshDocument(); |