mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-18 00:37:58 +00:00
Merge pull request #2378
738e802
macOS/Windows: fix compiler warning (selsta)
This commit is contained in:
commit
b91afaf5c7
3 changed files with 6 additions and 2 deletions
2
main.cpp
2
main.cpp
|
@ -192,7 +192,9 @@ int main(int argc, char *argv[])
|
||||||
qWarning().noquote() << "app startd" << "(log: " + logPath + ")";
|
qWarning().noquote() << "app startd" << "(log: " + logPath + ")";
|
||||||
|
|
||||||
// Desktop entry
|
// Desktop entry
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
registerXdgMime(app);
|
registerXdgMime(app);
|
||||||
|
#endif
|
||||||
|
|
||||||
IPC *ipc = new IPC(&app);
|
IPC *ipc = new IPC(&app);
|
||||||
QStringList posArgs = parser.positionalArguments();
|
QStringList posArgs = parser.positionalArguments();
|
||||||
|
|
|
@ -67,6 +67,7 @@ QString getAccountName(){
|
||||||
return accountName;
|
return accountName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
QString xdgMime(QApplication &app){
|
QString xdgMime(QApplication &app){
|
||||||
return QString(
|
return QString(
|
||||||
"[Desktop Entry]\n"
|
"[Desktop Entry]\n"
|
||||||
|
@ -88,7 +89,6 @@ QString xdgMime(QApplication &app){
|
||||||
}
|
}
|
||||||
|
|
||||||
void registerXdgMime(QApplication &app){
|
void registerXdgMime(QApplication &app){
|
||||||
#ifdef Q_OS_LINUX
|
|
||||||
// Register desktop entry
|
// Register desktop entry
|
||||||
// - MacOS handled via Info.plist
|
// - MacOS handled via Info.plist
|
||||||
// - Windows handled in the installer by rbrunner7
|
// - Windows handled in the installer by rbrunner7
|
||||||
|
@ -111,8 +111,8 @@ void registerXdgMime(QApplication &app){
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fileWrite(filePath, mime);
|
fileWrite(filePath, mime);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QString randomUserAgent(){
|
QString randomUserAgent(){
|
||||||
QStringList urand;
|
QStringList urand;
|
||||||
|
|
|
@ -37,8 +37,10 @@ bool fileExists(QString path);
|
||||||
QByteArray fileOpen(QString path);
|
QByteArray fileOpen(QString path);
|
||||||
bool fileWrite(QString path, QString data);
|
bool fileWrite(QString path, QString data);
|
||||||
QString getAccountName();
|
QString getAccountName();
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
QString xdgMime(QApplication &app);
|
QString xdgMime(QApplication &app);
|
||||||
void registerXdgMime(QApplication &app);
|
void registerXdgMime(QApplication &app);
|
||||||
|
#endif
|
||||||
const static QRegExp reURI = QRegExp("^\\w+:\\/\\/([\\w+\\-?\\-_\\-=\\-&]+)");
|
const static QRegExp reURI = QRegExp("^\\w+:\\/\\/([\\w+\\-?\\-_\\-=\\-&]+)");
|
||||||
QString randomUserAgent();
|
QString randomUserAgent();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue