Skip to content

Commit

Permalink
Fix linking in mythplugins with picky linkers.
Browse files Browse the repository at this point in the history
Reverts SHA: 8d49bf3 and modifies
SHA: a746d46 so that libmythtv isn't
required in mythplugins.
  • Loading branch information
sphery authored and jyavenard committed Dec 14, 2010
1 parent e44b025 commit f642741
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
29 changes: 25 additions & 4 deletions mythplugins/mythbrowser/mythbrowser/mythflashplayer.cpp
Expand Up @@ -10,11 +10,11 @@
#include <mythcontext.h>
#include <libmythui/mythmainwindow.h>
#include <mythuiwebbrowser.h>
#include <playgroup.h>

// mythbrowser
#include "webpage.h"
#include "mythflashplayer.h"
#include "mythdb.h"

using namespace std;

Expand All @@ -23,9 +23,9 @@ MythFlashPlayer::MythFlashPlayer(MythScreenStack *parent,
: MythScreenType (parent, "mythflashplayer"),
m_browser(NULL), m_url(urlList[0])
{
m_fftime = PlayGroup::GetSetting("Default", "skipahead", 30);
m_rewtime = PlayGroup::GetSetting("Default", "skipback", 5);
m_jumptime = PlayGroup::GetSetting("Default", "jump", 10);
m_fftime = GetPlayGroupSetting("Default", "skipahead", 30);
m_rewtime = GetPlayGroupSetting("Default", "skipback", 5);
m_jumptime = GetPlayGroupSetting("Default", "jump", 10);
qApp->setOverrideCursor(QCursor(Qt::BlankCursor));
}

Expand Down Expand Up @@ -104,3 +104,24 @@ bool MythFlashPlayer::keyPressEvent(QKeyEvent *event)

return handled;
}

int MythFlashPlayer::GetPlayGroupSetting(const QString &name,
const QString &field, int defval)
{
int res = defval;

MSqlQuery query(MSqlQuery::InitCon());
query.prepare(QString("SELECT name, %1 FROM playgroup "
"WHERE (name = :NAME OR name = 'Default') "
" AND %2 <> 0 "
"ORDER BY name = 'Default';")
.arg(field).arg(field));
query.bindValue(":NAME", name);
if (!query.exec())
MythDB::DBError("MythFlashPlayer::GetPlayGroupSetting", query);
else if (query.next())
res = query.value(1).toInt();

return res;
}

2 changes: 2 additions & 0 deletions mythplugins/mythbrowser/mythbrowser/mythflashplayer.h
Expand Up @@ -18,6 +18,8 @@ class MythFlashPlayer : public MythScreenType

private:
QVariant evaluateJavaScript(const QString&);
int GetPlayGroupSetting(const QString &name,
const QString &field, int defval);
MythUIWebBrowser* m_browser;
QString m_url;
int m_fftime;
Expand Down
1 change: 0 additions & 1 deletion mythplugins/programs-libs.pro
Expand Up @@ -6,7 +6,6 @@ DEPENDPATH *= $${INCLUDEPATH}

LIBS += -L$${LIBDIR} $$EXTRA_LIBS -lmythdb-$$LIBVERSION
LIBS += -lmyth-$$LIBVERSION -lmythui-$$LIBVERSION -lmythupnp-$$LIBVERSION
LIBS += -lmythtv-$$LIBVERSION
LIBS += -lmythavcodec
LIBS += -lmythavcore
LIBS += -lmythavutil
Expand Down

0 comments on commit f642741

Please sign in to comment.