Skip to content

Commit

Permalink
VERBOSE -> LOG in mythbrowser, mythgallery
Browse files Browse the repository at this point in the history
  • Loading branch information
Beirdo committed Jul 9, 2011
1 parent 4d5e6ca commit 896276c
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 78 deletions.
2 changes: 1 addition & 1 deletion mythplugins/mythbrowser/mythbrowser/bookmarkeditor.cpp
Expand Up @@ -70,7 +70,7 @@ bool BookmarkEditor::Create()
if (!m_categoryEdit || !m_nameEdit || !m_urlEdit || !m_okButton
|| !m_cancelButton || !m_findCategoryButton)
{
VERBOSE(VB_IMPORTANT, "Theme is missing critical theme elements.");
LOG(VB_GENERAL, LOG_ERR, "Theme is missing critical theme elements.");
return false;
}

Expand Down
8 changes: 4 additions & 4 deletions mythplugins/mythbrowser/mythbrowser/bookmarkmanager.cpp
Expand Up @@ -57,7 +57,7 @@ bool BrowserConfig::Create()

if (!m_commandEdit || !m_zoomEdit || !m_enablePluginsCheck || !m_okButton || !m_cancelButton)
{
VERBOSE(VB_IMPORTANT, "Theme is missing critical theme elements.");
LOG(VB_GENERAL, LOG_ERR, "Theme is missing critical theme elements.");
return false;
}

Expand Down Expand Up @@ -178,7 +178,7 @@ bool BookmarkManager::Create(void)

if (!m_groupList || !m_bookmarkList)
{
VERBOSE(VB_IMPORTANT, "Theme is missing critical theme elements.");
LOG(VB_GENERAL, LOG_ERR, "Theme is missing critical theme elements.");
return false;
}

Expand Down Expand Up @@ -429,8 +429,8 @@ void BookmarkManager::ShowEditDialog(bool edit)
}
else
{
VERBOSE(VB_IMPORTANT, "BookmarkManager: Something is wrong. "
"Asked to edit a non existent bookmark!");
LOG(VB_GENERAL, LOG_ERR, "BookmarkManager: Something is wrong. "
"Asked to edit a non existent bookmark!");
return;
}
}
Expand Down
15 changes: 8 additions & 7 deletions mythplugins/mythbrowser/mythbrowser/browserdbutil.cpp
Expand Up @@ -16,8 +16,8 @@ static bool UpdateDBVersionNumber(const QString &newnumber)

if (!gCoreContext->SaveSettingOnHost("BrowserDBSchemaVer", newnumber, NULL))
{
VERBOSE(VB_IMPORTANT,
QString("DB Error (Setting new DB version number): %1\n")
LOG(VB_GENERAL, LOG_ERR,
QString("DB Error (Setting new DB version number): %1\n")
.arg(newnumber));

return false;
Expand All @@ -31,7 +31,8 @@ static bool performActualUpdate(const QString updates[], QString version,
{
MSqlQuery query(MSqlQuery::InitCon());

VERBOSE(VB_IMPORTANT, "Upgrading to MythBrowser schema version " + version);
LOG(VB_GENERAL, LOG_NOTICE,
"Upgrading to MythBrowser schema version " + version);

int counter = 0;
QString thequery = updates[counter];
Expand All @@ -46,7 +47,7 @@ static bool performActualUpdate(const QString updates[], QString version,
.arg(thequery)
.arg(MythDB::DBErrorMessage(query.lastError()))
.arg(version);
VERBOSE(VB_IMPORTANT, msg);
LOG(VB_GENERAL, LOG_ERR, msg);
return false;
}

Expand All @@ -70,8 +71,8 @@ bool UpgradeBrowserDatabaseSchema(void)

if (dbver == "")
{
VERBOSE(VB_IMPORTANT,
"Inserting MythBrowser initial database information.");
LOG(VB_GENERAL, LOG_NOTICE,
"Inserting MythBrowser initial database information.");

const QString updates[] =
{
Expand Down Expand Up @@ -224,7 +225,7 @@ int GetSiteList(QList<Bookmark*> &siteList)
if (!query.exec("SELECT category, name, url FROM websites "
"ORDER BY category, name"))
{
VERBOSE(VB_IMPORTANT, "BookmarkManager: Error in loading from DB");
LOG(VB_GENERAL, LOG_ERR, "BookmarkManager: Error in loading from DB");
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion mythplugins/mythbrowser/mythbrowser/main.cpp
Expand Up @@ -24,7 +24,7 @@ static int handleMedia(const QString &url, const QString &directory, const QStri
{
if (url.isEmpty())
{
VERBOSE(VB_IMPORTANT, "MythBrowser: handleMedia got empty url!");
LOG(VB_GENERAL, LOG_ERR, "MythBrowser: handleMedia got empty url!");
return 1;
}

Expand Down
2 changes: 1 addition & 1 deletion mythplugins/mythbrowser/mythbrowser/mythbrowser.cpp
Expand Up @@ -53,7 +53,7 @@ bool MythBrowser::Create(void)

if (!browser || !m_pageList)
{
VERBOSE(VB_IMPORTANT, "Theme is missing critical theme elements.");
LOG(VB_GENERAL, LOG_ERR, "Theme is missing critical theme elements.");
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion mythplugins/mythbrowser/mythbrowser/mythflashplayer.cpp
Expand Up @@ -55,7 +55,7 @@ bool MythFlashPlayer::Create(void)
SetFocusWidget(m_browser);

m_url.replace("mythflash://", "http://");
VERBOSE(VB_GENERAL, QString("Opening %1").arg(m_url));
LOG(VB_GENERAL, LOG_INFO, QString("Opening %1").arg(m_url));
m_browser->LoadPage(QUrl::fromEncoded(m_url.toLocal8Bit()));

return true;
Expand Down
14 changes: 7 additions & 7 deletions mythplugins/mythgallery/mythgallery/dbcheck.cpp
Expand Up @@ -19,8 +19,8 @@ static bool UpdateDBVersionNumber(const QString &newnumber)

if (!gCoreContext->SaveSettingOnHost("GalleryDBSchemaVer",newnumber,NULL))
{
VERBOSE(VB_IMPORTANT,
QString("DB Error (Setting new DB version number): %1\n")
LOG(VB_GENERAL, LOG_ERR,
QString("DB Error (Setting new DB version number): %1\n")
.arg(newnumber));

return false;
Expand All @@ -34,8 +34,8 @@ static bool performActualUpdate(const QString updates[], QString version,
{
MSqlQuery query(MSqlQuery::InitCon());

VERBOSE(VB_IMPORTANT,
"Upgrading to MythGallery schema version " + version);
LOG(VB_GENERAL, LOG_NOTICE,
"Upgrading to MythGallery schema version " + version);

int counter = 0;
QString thequery = updates[counter];
Expand All @@ -50,7 +50,7 @@ static bool performActualUpdate(const QString updates[], QString version,
.arg(thequery)
.arg(MythDB::DBErrorMessage(query.lastError()))
.arg(version);
VERBOSE(VB_IMPORTANT, msg);
LOG(VB_IMPORTANT, LOG_ERR, msg);
return false;
}

Expand All @@ -74,8 +74,8 @@ bool UpgradeGalleryDatabaseSchema(void)

if (dbver == "")
{
VERBOSE(VB_IMPORTANT,
"Inserting MythGallery initial database information.");
LOG(VB_GENERAL, LOG_NOTICE,
"Inserting MythGallery initial database information.");

const QString updates[] = {
"CREATE TABLE IF NOT EXISTS gallerymetadata ("
Expand Down
31 changes: 15 additions & 16 deletions mythplugins/mythgallery/mythgallery/galleryutil.cpp
Expand Up @@ -144,7 +144,9 @@ long GalleryUtil::GetNaturalRotation(const QString &filePathString)
if (entry)
{
ExifShort v_short = exif_get_short (entry->data, byteorder);
VERBOSE(VB_GENERAL|VB_EXTRA, QString("Exif entry=%1").arg(v_short));
LOG(VB_GENERAL, LOG_DEBUG,
QString("Exif entry=%1").arg(v_short));

/* See http://sylvana.net/jpegcrop/exif_orientation.html*/
if (v_short == 8)
{
Expand All @@ -161,9 +163,8 @@ long GalleryUtil::GetNaturalRotation(const QString &filePathString)
}
else
{
VERBOSE(VB_FILE, LOC_ERR +
QString("Could not load exif data from '%1'")
.arg(filePath));
LOG(VB_FILE, LOG_ERR, LOC +
QString("Could not load exif data from '%1'") .arg(filePath));
}

delete [] exifvalue;
Expand Down Expand Up @@ -196,8 +197,8 @@ long GalleryUtil::GetNaturalRotation(const QString &filePathString)
}
catch (...)
{
VERBOSE(VB_IMPORTANT, LOC_ERR +
QString("Failed to extract EXIF headers from '%1'")
LOG(VB_GENERAL, LOG_ERR, LOC +
QString("Failed to extract EXIF headers from '%1'")
.arg(filePathString));
}

Expand Down Expand Up @@ -328,19 +329,17 @@ QString GalleryUtil::GetCaption(const QString &filePath)
}
else
{
VERBOSE(VB_FILE, LOC_ERR +
QString("Could not load exif data from '%1'")
.arg(filePath));
LOG(VB_FILE, LOG_ERR, LOC +
QString("Could not load exif data from '%1'") .arg(filePath));
}

delete [] exifvalue;
#endif // EXIF_SUPPORT
}
catch (...)
{
VERBOSE(VB_IMPORTANT, LOC_ERR +
QString("Failed to extract EXIF headers from '%1'")
.arg(filePath));
LOG(VB_GENERAL, LOG_ERR, LOC +
QString("Failed to extract EXIF headers from '%1'") .arg(filePath));
}

return caption;
Expand Down Expand Up @@ -671,8 +670,8 @@ static QFileInfo MakeUnique(const QFileInfo &dest)

newDest.setFile(dest.dir(), basename);

VERBOSE(VB_GENERAL, LOC_ERR +
QString("Need to find a new name for '%1' trying '%2'")
LOG(VB_GENERAL, LOG_ERR, LOC +
QString("Need to find a new name for '%1' trying '%2'")
.arg(dest.absoluteFilePath()).arg(newDest.absoluteFilePath()));
}

Expand All @@ -688,8 +687,8 @@ static QFileInfo MakeUniqueDirectory(const QFileInfo &dest)
QString fullname = QString("%1_%2").arg(dest.absoluteFilePath()).arg(i);
newDest.setFile(fullname);

VERBOSE(VB_GENERAL, LOC_ERR +
QString("Need to find a new name for '%1' trying '%2'")
LOG(VB_GENERAL, LOG_ERR, LOC +
QString("Need to find a new name for '%1' trying '%2'")
.arg(dest.absoluteFilePath()).arg(newDest.absoluteFilePath()));
}

Expand Down
8 changes: 4 additions & 4 deletions mythplugins/mythgallery/mythgallery/glsingleview.cpp
Expand Up @@ -276,7 +276,7 @@ void GLSingleView::paintGL(void)
}

if (glGetError())
VERBOSE(VB_GENERAL, LOC_ERR + "OpenGL error detected");
LOG(VB_GENERAL, LOG_ERR, LOC + "OpenGL error detected");
}

void GLSingleView::keyPressEvent(QKeyEvent *e)
Expand Down Expand Up @@ -627,7 +627,7 @@ void GLSingleView::Load(void)
ThumbItem *item = m_itemList.at(m_pos);
if (!item)
{
VERBOSE(VB_IMPORTANT, LOC_ERR + QString("No item at %1").arg(m_pos));
LOG(VB_GENERAL, LOG_ERR, LOC + QString("No item at %1").arg(m_pos));
return;
}

Expand Down Expand Up @@ -1391,7 +1391,7 @@ void GLSingleView::SlideTimeout(void)
bool wasMovie = false, isMovie = false;
if (m_effect_method.isEmpty())
{
VERBOSE(VB_IMPORTANT, LOC_ERR + "No transition method");
LOG(VB_GENERAL, LOG_ERR, LOC + "No transition method");
return;
}

Expand Down Expand Up @@ -1537,7 +1537,7 @@ void KenBurnsImageLoader::run()
ThumbItem *item = m_itemList.at(m_pos);
if (!item)
{
VERBOSE(VB_IMPORTANT, LOC_ERR + QString("No item at %1").arg(m_pos));
LOG(VB_GENERAL, LOG_ERR, LOC + QString("No item at %1").arg(m_pos));
return;
}
QImage image(item->GetPath());
Expand Down

0 comments on commit 896276c

Please sign in to comment.