mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-05 15:34:39 -04:00
Get local user manual working on Linux systems.
The location of documentation files on Linux distributions is controlled to a certain extent. Using the QStandardPaths::locate() method helps us with this. Work round the misbehaviour of QCoreApplication::applicationDirPath() when the CWD has been changed by working out the documentation location before changing the CWD to a temporary directory. This path is now provided by the Configuration settings class which also manages other run time paths. Updated Debian packaging to move a little nearer a conforming DEB file. Added a basic manpage for rigctld-wsjtx. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4364 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
+1
-8
@@ -1022,14 +1022,7 @@ void MainWindow::on_actionOnline_User_Guide_triggered() //Display manual
|
||||
//Display local copy of manual
|
||||
void MainWindow::on_actionLocal_User_Guide_triggered()
|
||||
{
|
||||
#if !defined (Q_OS_WIN) || QT_VERSION >= 0x050300
|
||||
QDir path {QStandardPaths::locate (QStandardPaths::DataLocation, WSJT_DOC_DESTINATION, QStandardPaths::LocateDirectory)};
|
||||
#else
|
||||
QDir path {QCoreApplication::applicationDirPath ()};
|
||||
path.cd (WSJT_DOC_DESTINATION);
|
||||
#endif
|
||||
|
||||
auto file = path.absoluteFilePath (PROJECT_MANUAL);
|
||||
auto file = m_config.doc_path ().absoluteFilePath (PROJECT_MANUAL);
|
||||
QDesktopServices::openUrl (QUrl {"file:///" + file});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user