mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Fix YACReader launch on MacOS
This commit is contained in:
parent
827a76413b
commit
d9d94b103a
@ -1782,11 +1782,9 @@ void LibraryWindow::openComic()
|
|||||||
quint64 libraryId = libraries.getId(selectedLibrary->currentText());
|
quint64 libraryId = libraries.getId(selectedLibrary->currentText());
|
||||||
bool yacreaderFound = false;
|
bool yacreaderFound = false;
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MACOS
|
||||||
QStringList possiblePaths{
|
QStringList possiblePaths {QDir::cleanPath(QCoreApplication::applicationDirPath()+"/../../../")};
|
||||||
QDir::cleanPath(QCoreApplication::applicationDirPath()+"/../../../"),
|
possiblePaths += QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation);
|
||||||
QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation)
|
|
||||||
};
|
|
||||||
|
|
||||||
for (auto && ypath: possiblePaths)
|
for (auto && ypath: possiblePaths)
|
||||||
{
|
{
|
||||||
@ -1794,8 +1792,8 @@ void LibraryWindow::openComic()
|
|||||||
if (QFileInfo(yacreaderPath).exists())
|
if (QFileInfo(yacreaderPath).exists())
|
||||||
{
|
{
|
||||||
yacreaderFound = true;
|
yacreaderFound = true;
|
||||||
QStringList parameters{"-n", yacreaderPath, currentPath(), QString("--comicId=%1").arg(comic.id), QString("--libraryId=%1").arg(libraryId)};
|
QStringList parameters {"-n", yacreaderPath, "--args", currentPath(), QString("--comicId=%1").arg(comic.id), QString("--libraryId=%1").arg(libraryId)};
|
||||||
QProcess::startDetached(QStringLiteral("open"), parameters);
|
QProcess::startDetached("open", parameters);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user