[gnote] Move semantic for add_app_action
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Move semantic for add_app_action
- Date: Sun, 20 Feb 2022 13:48:55 +0000 (UTC)
commit 006af91fa70001e7067e0daef67b360fc2928d36
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sun Feb 20 15:48:47 2022 +0200
Move semantic for add_app_action
src/actionmanager.cpp | 6 +++---
src/actionmanager.hpp | 4 ++--
src/iactionmanager.hpp | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/actionmanager.cpp b/src/actionmanager.cpp
index 6c184e0d..c9f2bc32 100644
--- a/src/actionmanager.cpp
+++ b/src/actionmanager.cpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2011-2019 Aurimas Cernius
+ * Copyright (C) 2011-2019,2022 Aurimas Cernius
* Copyright (C) 2009 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
@@ -110,9 +110,9 @@ namespace gnote {
return Glib::RefPtr<Gio::SimpleAction>();
}
- Glib::RefPtr<Gio::SimpleAction> ActionManager::add_app_action(const Glib::ustring & name)
+ Glib::RefPtr<Gio::SimpleAction> ActionManager::add_app_action(Glib::ustring && name)
{
- Glib::RefPtr<Gio::SimpleAction> action = Gio::SimpleAction::create(name);
+ Glib::RefPtr<Gio::SimpleAction> action = Gio::SimpleAction::create(std::move(name));
m_app_actions.push_back(action);
return action;
}
diff --git a/src/actionmanager.hpp b/src/actionmanager.hpp
index c90ba2aa..2609bd73 100644
--- a/src/actionmanager.hpp
+++ b/src/actionmanager.hpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2012-2013,2015-2019 Aurimas Cernius
+ * Copyright (C) 2012-2013,2015-2019,2022 Aurimas Cernius
* Copyright (C) 2009 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
@@ -43,7 +43,7 @@ public:
{
return m_app_actions;
}
- virtual Glib::RefPtr<Gio::SimpleAction> add_app_action(const Glib::ustring & name) override;
+ virtual Glib::RefPtr<Gio::SimpleAction> add_app_action(Glib::ustring && name) override;
virtual void add_app_menu_item(int section, int order, const Glib::ustring & label,
const Glib::ustring & action_def) override;
virtual void register_main_window_action(const Glib::ustring & action, const Glib::VariantType *state_type,
diff --git a/src/iactionmanager.hpp b/src/iactionmanager.hpp
index 2fe181e8..df4434d6 100644
--- a/src/iactionmanager.hpp
+++ b/src/iactionmanager.hpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2013,2015-2017,2019,2021 Aurimas Cernius
+ * Copyright (C) 2013,2015-2017,2019,2021-2022 Aurimas Cernius
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ public:
virtual ~IActionManager();
virtual Glib::RefPtr<Gio::SimpleAction> get_app_action(const Glib::ustring & name) const = 0;
- virtual Glib::RefPtr<Gio::SimpleAction> add_app_action(const Glib::ustring & name) = 0;
+ virtual Glib::RefPtr<Gio::SimpleAction> add_app_action(Glib::ustring && name) = 0;
virtual void add_app_menu_item(int section, int order, const Glib::ustring & label,
const Glib::ustring & action_def) = 0;
virtual void register_main_window_action(const Glib::ustring & action, const Glib::VariantType *state_type,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]