[office/tellico/4.2] src: Add Check-In command to menu and be sure to update modified entries

Robby Stephenson <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit c10c8b8aa0b15931d96369ec7846b0dca6487804 by Robby Stephenson.
Committed on 26/07/2026 at 20:13.
Pushed by rstephenson into branch '4.2'.

Add Check-In command to menu and be sure to update modified entries

M  +3    -0    src/commands/removeloans.cpp
M  +1    -0    src/controller.cpp
M  +1    -3    src/document.cpp

https://invent.kde.org/office/tellico/-/commit/c10c8b8aa0b15931d96369ec7846b0dca6487804

diff --git a/src/commands/removeloans.cpp b/src/commands/removeloans.cpp
index 3acb78027..7e0fb412e 100644
--- a/src/commands/removeloans.cpp
+++ b/src/commands/removeloans.cpp
@@ -60,6 +60,9 @@ void RemoveLoans::redo() {
     modifiedEntries.append(loan->entry());
     Controller::self()->modifiedBorrower(loan->borrower());
   }
+  if(!modifiedEntries.isEmpty()) {
+    Controller::self()->modifiedEntries(modifiedEntries);
+  }
   if(!calLoans.isEmpty()) {
     myWarning() << "Add to calendar not implemented";
   }
diff --git a/src/controller.cpp b/src/controller.cpp
index e45030c33..6742f68f3 100644
--- a/src/controller.cpp
+++ b/src/controller.cpp
@@ -511,6 +511,7 @@ void Controller::plugEntryActions(QMenu* popup_) {
   // plugging the menu isn't enough to have the popup get populated
   plugUpdateMenu(popup_);
   popup_->addSeparator();
+  popup_->addAction(m_mainWindow->m_checkInEntry);
   popup_->addAction(m_mainWindow->m_checkOutEntry);
 }
 
diff --git a/src/document.cpp b/src/document.cpp
index 20563463a..ebc5b140f 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -523,9 +523,7 @@ void Document::checkOutEntry(Tellico::Data::EntryPtr entry_) {
     m_coll->addField(f);
   }
   entry_->setField(loaned, QStringLiteral("true"));
-  EntryList vec;
-  vec.append(entry_);
-  m_coll->updateDicts(vec, QStringList() << loaned);
+  m_coll->updateDicts(EntryList() << entry_, QStringList() << loaned);
 }
 
 void Document::checkInEntry(Tellico::Data::EntryPtr entry_) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.