Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MythContext refactoring (remove gContext) #671

Merged
merged 19 commits into from
Feb 26, 2025
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
dfe2e3a
MythBackend.php: fix comment
ulmus-scott Nov 20, 2022
a407809
MythContextSlotHandler: merge into MythContextPrivate
ulmus-scott Nov 19, 2022
600fbc8
MythContextPrivate: PIMPL idiom style
ulmus-scott Nov 20, 2022
6f59779
MythContext::Impl: remove member m_parent
ulmus-scott Nov 20, 2022
e103dab
MythContext::Impl: create LanguagePrompt()
ulmus-scott Nov 20, 2022
8f75012
MythContext: C++ does not require a void parameter
ulmus-scott Nov 20, 2022
0438836
MythContext::Impl::ResetDatabase(): convert to a static function
ulmus-scott Nov 22, 2022
26128da
MythContext::Impl::LoadDatabaseSettings(): split into three function …
ulmus-scott Nov 22, 2022
e97bf2b
MythContext::Impl::SaveDatabaseParams(): directly access the MythDB s…
ulmus-scott Nov 22, 2022
67a5db6
DatabaseParams: remove unused parameter m_forceSave
ulmus-scott Nov 18, 2024
92a4de3
remove DatabaseParams::LoadDefaults()
ulmus-scott Nov 18, 2024
e10ba67
libmyth/mythcontext.cpp: create class DatabaseParamsCache
ulmus-scott Nov 18, 2024
698a2a7
MythContext::Impl::SilenceDBerrors(): fix braces
ulmus-scott Nov 18, 2024
d3529f8
merge DatabaseParamsCache into MythDB
ulmus-scott Nov 18, 2024
1040637
mythfrontend/exitprompt.cpp: remove backend connection popup hack
ulmus-scott Nov 20, 2024
5eede53
libmyth/mythcontext: remove gContext
ulmus-scott Nov 22, 2024
7324dd6
SignalHandler: move calls into MythContext
ulmus-scott Nov 22, 2024
f7ca74e
merge CleanupGuard into MythContext
ulmus-scott Nov 22, 2024
e198c2a
mythlogging.h: copy StringUtil::bool_to_string() as boolToQString()
ulmus-scott Feb 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
mythlogging.h: copy StringUtil::bool_to_string() as boolToQString()
ulmus-scott committed Feb 25, 2025
commit e198c2a3d5669fec35942319e7f8481ce21a71b9
8 changes: 8 additions & 0 deletions mythtv/libs/libmythbase/mythlogging.h
Original file line number Diff line number Diff line change
@@ -80,6 +80,14 @@ inline QString pointerToQString(const void *p)
sizeof(void*) * 2, 16, QChar('0'));
}

/**
This is equivalent to QVariant(bool).toString()
*/
inline QString boolToQString(bool val)
{
return (val) ? QStringLiteral("true") : QStringLiteral("false");
}

#endif

/*
3 changes: 1 addition & 2 deletions mythtv/libs/libmythtv/io/mythstreamingbuffer.cpp
Original file line number Diff line number Diff line change
@@ -5,7 +5,6 @@

// MythTV
#include "libmythbase/mythlogging.h"
#include "libmythbase/stringutil.h"

// FFmpeg
extern "C" {
@@ -81,7 +80,7 @@ bool MythStreamingBuffer::OpenFile(const QString &Filename, std::chrono::millise
m_allowSeeks = !m_streamed && avio_seek(m_context, 0, SEEK_SET) >= 0;

LOG(VB_GENERAL, LOG_INFO, LOC + QString("Opened %1 (allow seeks: %2")
.arg(m_filename, StringUtil::bool_to_string(m_allowSeeks)));
.arg(m_filename, boolToQString(m_allowSeeks)));

m_rwLock.unlock();
return true;