mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-01 20:38:06 +01:00
parent
f3491add62
commit
3f78df5725
@ -71,6 +71,20 @@ CommandlineOptions::CommandlineOptions(int argc, char** argv)
|
|||||||
engine_(Engine::Type_QtPhonon)
|
engine_(Engine::Type_QtPhonon)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
#ifdef Q_OS_DARWIN
|
||||||
|
// Remove -psn_xxx option that Mac passes when opened from Finder.
|
||||||
|
for (int i = 0; i < argc_; ++i) {
|
||||||
|
QString opt(argv_[i]);
|
||||||
|
if (opt.startsWith("-psn")) {
|
||||||
|
// Shuffle remaining args.
|
||||||
|
for (int j = i; j < argc_; ++j) {
|
||||||
|
argv_[j] = argv_[j+1];
|
||||||
|
}
|
||||||
|
--argc_;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CommandlineOptions::Parse() {
|
bool CommandlineOptions::Parse() {
|
||||||
|
@ -86,14 +86,6 @@ int main(int argc, char *argv[]) {
|
|||||||
// Do Mac specific startup to get media keys working.
|
// Do Mac specific startup to get media keys working.
|
||||||
// This must go before QApplication initialisation.
|
// This must go before QApplication initialisation.
|
||||||
mac::MacMain();
|
mac::MacMain();
|
||||||
|
|
||||||
// Strip mac command line option.
|
|
||||||
for (int i = 0; i < argc; ++i) {
|
|
||||||
QString arg(argv[i]);
|
|
||||||
if (arg.startsWith("-psn")) {
|
|
||||||
argv[i][0] = '\0';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QCoreApplication::setApplicationName("Clementine");
|
QCoreApplication::setApplicationName("Clementine");
|
||||||
|
Loading…
Reference in New Issue
Block a user