mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
QofSession, QofBackend: Change book_id to uri.
It's more descriptive and less likely to be confused with the book:id value in XML files that is the book's GUID. Also changed the QofSessionImpl::begin new_uri parameter from std::string to const char*. There's no point in allocating a string just to call new_uri.c_str() all over the place.
This commit is contained in:
@@ -106,11 +106,11 @@ GncXmlBackend::check_path (const char* fullpath, bool create)
|
||||
}
|
||||
|
||||
void
|
||||
GncXmlBackend::session_begin(QofSession* session, const char* book_id,
|
||||
GncXmlBackend::session_begin(QofSession* session, const char* new_uri,
|
||||
bool ignore_lock, bool create, bool force)
|
||||
{
|
||||
/* Make sure the directory is there */
|
||||
m_fullpath = gnc_uri_get_path (book_id);
|
||||
m_fullpath = gnc_uri_get_path (new_uri);
|
||||
|
||||
if (m_fullpath.empty())
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
GncXmlBackend(const GncXmlBackend&&) = delete;
|
||||
GncXmlBackend operator=(const GncXmlBackend&&) = delete;
|
||||
~GncXmlBackend() = default;
|
||||
void session_begin(QofSession* session, const char* book_id,
|
||||
void session_begin(QofSession* session, const char* new_uri,
|
||||
bool ignore_lock, bool create, bool force) override;
|
||||
void session_end() override;
|
||||
void load(QofBook* book, QofBackendLoadType loadType) override;
|
||||
|
||||
Reference in New Issue
Block a user