mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-20 06:25:02 +01:00
parent
f3491add62
commit
3f78df5725
@ -71,6 +71,20 @@ CommandlineOptions::CommandlineOptions(int argc, char** argv)
|
||||
engine_(Engine::Type_QtPhonon)
|
||||
#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() {
|
||||
|
@ -86,14 +86,6 @@ int main(int argc, char *argv[]) {
|
||||
// Do Mac specific startup to get media keys working.
|
||||
// This must go before QApplication initialisation.
|
||||
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
|
||||
|
||||
QCoreApplication::setApplicationName("Clementine");
|
||||
|
Loading…
Reference in New Issue
Block a user