fixed title for first run, fixed linux exec-by-link

This commit is contained in:
John Preston 2014-12-16 09:05:18 -08:00
parent 929d1e2ad9
commit 96e72af509
3 changed files with 10 additions and 2 deletions

View File

@ -803,6 +803,9 @@ QString psCurrentExeDirectory(int argc, char *argv[]) {
QString first = argc ? QString::fromLocal8Bit(argv[0]) : QString();
if (!first.isEmpty()) {
QFileInfo info(first);
if (info.isSymLink()) {
info = info.symLinkTarget();
}
if (info.exists()) {
return QDir(info.absolutePath()).absolutePath() + '/';
}
@ -814,6 +817,9 @@ QString psCurrentExeName(int argc, char *argv[]) {
QString first = argc ? QString::fromLocal8Bit(argv[0]) : QString();
if (!first.isEmpty()) {
QFileInfo info(first);
if (info.isSymLink()) {
info = info.symLinkTarget();
}
if (info.exists()) {
return info.fileName();
}

View File

@ -65,6 +65,8 @@ TitleWidget::TitleWidget(Window *window)
{
setGeometry(0, 0, wnd->width(), st::titleHeight);
_update.hide();
_cancel.hide();
_back.hide();
if (App::app()->updatingState() == Application::UpdatingReady) {
showUpdateBtn();
}