Skip to content

Commit 27310b1

Browse files
committed
Fixed the segfault with updatemanager and disabled updatemanager on linux (for now)
Also fixed the definitions via CMakeLists.txt which was picking up extra quotes. Finalized PKGBUILD
1 parent d96b83a commit 27310b1

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ include_directories(
5151
${MPV_INCLUDE_DIRS}
5252
)
5353
add_definitions(
54-
-DBAKA_MPLAYER_VERSION="\\"${BAKA_MPLAYER_VERSION}\\""
55-
-DSETTINGS_FILE="\\"bakamplayer\\""
54+
-DBAKA_MPLAYER_VERSION="${BAKA_MPLAYER_VERSION}"
55+
-DSETTINGS_FILE="bakamplayer"
5656
${Qt5Core_DEFINITIONS}
5757
${Qt5Gui_DEFINITIONS}
5858
${Qt5Network_DEFINITIONS}

etc/sbin/pkgbuild/PKGBUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ package() {
3434
install -D "etc/doc/baka-mplayer.md" "$pkgdir/usr/share/doc/baka-mplayer/baka-mplayer.md"
3535
install -D "etc/doc/baka-mplayer.1.gz" "$pkgdir/usr/share/man/man1/baka-mplayer.1.gz"
3636
install -D "LICENSE" "$pkgdir/usr/share/licenses/baka-mplayer/LICENSE"
37-
install -D "$srcdir/baka-mplayer.svg" "$pkgdir/usr/share/pixmaps/baka-mplayer.svg"
38-
install -D "$srcdir/baka-mplayer.desktop" "$pkgdir/usr/share/applications/baka-mplayer.desktop"
37+
install -D "$srcdir/baka-mplayer.svg" "$pkgdir/usr/share/pixmaps/baka-mplayer.svg"
38+
install -D "$srcdir/baka-mplayer.desktop" "$pkgdir/usr/share/applications/baka-mplayer.desktop"
3939
}

src/Baka-MPlayer.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ QT += core gui network
99
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
1010

1111
TARGET = Baka-MPlayer
12-
DEFINES += 'BAKA_MPLAYER_VERSION=\\"1.9.8\\"' \
12+
DEFINES += 'BAKA_MPLAYER_VERSION=\\"1.9.9\\"' \
1313
'SETTINGS_FILE=\\"bakamplayer\\"'
1414

1515
TEMPLATE = app

src/ui/mainwindow.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,12 @@ MainWindow::MainWindow(QWidget *parent):
6464
settings = new QSettings(QSettings::IniFormat, QSettings::UserScope, SETTINGS_FILE, QString(), this);
6565
#endif
6666
mpv = new MpvHandler(ui->mpvFrame->winId(), this);
67+
#if defined(Q_OS_WIN)
6768
update = new UpdateManager(this);
68-
69+
#else
70+
// todo: remove this when checking for updates shows the latest version on linux
71+
ui->action_Check_for_Updates->setEnabled(false);
72+
#endif
6973
// initialize other ui elements
7074
// note: trayIcon does not work in my environment--known qt bug
7175
// see: https://bugreports.qt-project.org/browse/QTBUG-34364

src/updatemanager.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ void UpdateManager::CheckForUpdates()
2727
QList<QByteArray> pair;
2828
for(auto line : lines)
2929
{
30-
pair = line.split('=');
30+
if((pair = line.split('=')).size() != 2)
31+
break;
3132
info[QString(pair[0])] = QString(pair[1].replace('\r','\n')); // for multi-line info use \r's instead of \n's
3233
}
3334
emit Update(info);

0 commit comments

Comments
 (0)