diff --git a/src/lib/UrlLabel.cpp b/src/lib/UrlLabel.cpp index 9e8883e..0d981ea 100755 --- a/src/lib/UrlLabel.cpp +++ b/src/lib/UrlLabel.cpp @@ -52,9 +52,10 @@ else return text(); } void LinkLabel::mouseReleaseEvent(QMouseEvent* event){ -if(event->button()==Qt::LeftButton) -emit clicked(); -openBrowser(url()); + if(event->button()==Qt::LeftButton){ + emit clicked(); + openBrowser(url()); + } } void LinkLabel::setPos(int x,int y){ diff --git a/src/main.cpp b/src/main.cpp index 7af4053..c7c42cc 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -217,10 +217,9 @@ QString decodeFileError(QFile::FileError Code){ } void openBrowser(QString url){ -QProcess browser; QStringList args=config.OpenUrlCommand.arg(url).split(' '); QString cmd=args.takeFirst(); -browser.startDetached(cmd,args); +QProcess::startDetached(cmd,args); }