Skip to content

Commit

Permalink
Fixed the segfault with updatemanager and disabled updatemanager on l…
Browse files Browse the repository at this point in the history
…inux (for now)

Also fixed the definitions via CMakeLists.txt which was picking up extra quotes.
Finalized PKGBUILD
  • Loading branch information
u8sand committed Sep 26, 2014
1 parent d96b83a commit 27310b1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ include_directories(
${MPV_INCLUDE_DIRS}
)
add_definitions(
-DBAKA_MPLAYER_VERSION="\\"${BAKA_MPLAYER_VERSION}\\""
-DSETTINGS_FILE="\\"bakamplayer\\""
-DBAKA_MPLAYER_VERSION="${BAKA_MPLAYER_VERSION}"
-DSETTINGS_FILE="bakamplayer"
${Qt5Core_DEFINITIONS}
${Qt5Gui_DEFINITIONS}
${Qt5Network_DEFINITIONS}
Expand Down
4 changes: 2 additions & 2 deletions etc/sbin/pkgbuild/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ package() {
install -D "etc/doc/baka-mplayer.md" "$pkgdir/usr/share/doc/baka-mplayer/baka-mplayer.md"
install -D "etc/doc/baka-mplayer.1.gz" "$pkgdir/usr/share/man/man1/baka-mplayer.1.gz"
install -D "LICENSE" "$pkgdir/usr/share/licenses/baka-mplayer/LICENSE"
install -D "$srcdir/baka-mplayer.svg" "$pkgdir/usr/share/pixmaps/baka-mplayer.svg"
install -D "$srcdir/baka-mplayer.desktop" "$pkgdir/usr/share/applications/baka-mplayer.desktop"
install -D "$srcdir/baka-mplayer.svg" "$pkgdir/usr/share/pixmaps/baka-mplayer.svg"
install -D "$srcdir/baka-mplayer.desktop" "$pkgdir/usr/share/applications/baka-mplayer.desktop"
}
2 changes: 1 addition & 1 deletion src/Baka-MPlayer.pro
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ QT += core gui network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = Baka-MPlayer
DEFINES += 'BAKA_MPLAYER_VERSION=\\"1.9.8\\"' \
DEFINES += 'BAKA_MPLAYER_VERSION=\\"1.9.9\\"' \
'SETTINGS_FILE=\\"bakamplayer\\"'

TEMPLATE = app
Expand Down
6 changes: 5 additions & 1 deletion src/ui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,12 @@ MainWindow::MainWindow(QWidget *parent):
settings = new QSettings(QSettings::IniFormat, QSettings::UserScope, SETTINGS_FILE, QString(), this);
#endif
mpv = new MpvHandler(ui->mpvFrame->winId(), this);
#if defined(Q_OS_WIN)
update = new UpdateManager(this);

#else
// todo: remove this when checking for updates shows the latest version on linux
ui->action_Check_for_Updates->setEnabled(false);
#endif
// initialize other ui elements
// note: trayIcon does not work in my environment--known qt bug
// see: https://bugreports.qt-project.org/browse/QTBUG-34364
Expand Down
3 changes: 2 additions & 1 deletion src/updatemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ void UpdateManager::CheckForUpdates()
QList<QByteArray> pair;
for(auto line : lines)
{
pair = line.split('=');
if((pair = line.split('=')).size() != 2)
break;
info[QString(pair[0])] = QString(pair[1].replace('\r','\n')); // for multi-line info use \r's instead of \n's
}
emit Update(info);
Expand Down

0 comments on commit 27310b1

Please sign in to comment.