From 8bbe88693f15cf50f74cd7019cfd6982dfe7b4e6 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 20 Nov 2016 22:53:21 +0100 Subject: [PATCH] COPKGManager: simplify hintbox calls Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/318c64708dc7d445ac54d88f86ebd847ab27edf3 Author: Thilo Graf Date: 2016-11-20 (Sun, 20 Nov 2016) --- src/gui/opkg_manager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/opkg_manager.cpp b/src/gui/opkg_manager.cpp index b3df893e8..7c38b5f99 100644 --- a/src/gui/opkg_manager.cpp +++ b/src/gui/opkg_manager.cpp @@ -491,10 +491,10 @@ bool COPKGManager::checkUpdates(const std::string & package_name, bool show_prog int COPKGManager::doUpdate() { - CHintBox *hb = new CHintBox(LOCALE_MESSAGEBOX_INFO, LOCALE_OPKG_UPDATE_CHECK); - hb->paint(); + CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, LOCALE_OPKG_UPDATE_CHECK); + hintBox.paint(); int r = execCmd(pkg_types[OM_UPDATE], CShellWindow::QUIET); - delete hb; + hintBox.hide(); if (r) { string msg = string(g_Locale->getText(LOCALE_OPKG_FAILURE_UPDATE)); msg += '\n' + tmp_str;