[gnote] Replace std::string by Glib::ustring in Tag
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Replace std::string by Glib::ustring in Tag
- Date: Sat, 4 Feb 2017 13:50:27 +0000 (UTC)
commit 5345fe8e3d5dabc93e666b6609d949ae39510bb9
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sat Feb 4 14:29:16 2017 +0200
Replace std::string by Glib::ustring in Tag
src/tag.cpp | 6 +++---
src/tag.hpp | 19 ++++++++++---------
2 files changed, 13 insertions(+), 12 deletions(-)
---
diff --git a/src/tag.cpp b/src/tag.cpp
index c6cfd33..39f047d 100644
--- a/src/tag.cpp
+++ b/src/tag.cpp
@@ -23,7 +23,7 @@
#include <map>
-#include <glibmm.h>
+#include <glibmm/stringutils.h>
#include "sharp/map.hpp"
#include "sharp/string.hpp"
@@ -34,7 +34,7 @@ namespace gnote {
const char * Tag::SYSTEM_TAG_PREFIX = "system:";
- Tag::Tag(const std::string & _name)
+ Tag::Tag(const Glib::ustring & _name)
: m_issystem(false)
, m_isproperty(false)
{
@@ -58,7 +58,7 @@ namespace gnote {
}
- void Tag::set_name(const std::string & value)
+ void Tag::set_name(const Glib::ustring & value)
{
if (!value.empty()) {
Glib::ustring trimmed_name = sharp::string_trim(value);
diff --git a/src/tag.hpp b/src/tag.hpp
index ad036c9..0aa568e 100644
--- a/src/tag.hpp
+++ b/src/tag.hpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2013-2014 Aurimas Cernius
+ * Copyright (C) 2013-2014,2017 Aurimas Cernius
* Copyright (C) 2009 Hubert Figuiere
*
* This program is free software: you can redistribute it and/or modify
@@ -26,7 +26,8 @@
#include <list>
#include <map>
-#include <string>
+
+#include <glibmm/ustring.h>
#include "base/macros.hpp"
@@ -47,7 +48,7 @@ namespace gnote {
typedef shared_ptr<Tag> Ptr;
static const char * SYSTEM_TAG_PREFIX;
- Tag(const std::string & name);
+ Tag(const Glib::ustring & name);
// <summary>
// Associates the specified note with this tag.
@@ -61,15 +62,15 @@ namespace gnote {
// The name of the tag. This is what the user types in as the tag and
// what's used to show the tag to the user. This includes any 'system:' prefixes
// </summary>
- const std::string & name() const
+ const Glib::ustring & name() const
{
return m_name;
}
- void set_name(const std::string & );
+ void set_name(const Glib::ustring & );
// <summary>
// Use the string returned here to reference the tag in Dictionaries.
// </summary>
- const std::string & normalized_name() const
+ const Glib::ustring & normalized_name() const
{
return m_normalized_name;
}
@@ -99,15 +100,15 @@ namespace gnote {
/////
private:
- std::string m_name;
- std::string m_normalized_name;
+ Glib::ustring m_name;
+ Glib::ustring m_normalized_name;
bool m_issystem;
bool m_isproperty;
// <summary>
// Used to track which notes are currently tagged by this tag. The
// dictionary key is the Note.Uri.
// </summary>
- typedef std::map<std::string, NoteBase*> NoteMap;
+ typedef std::map<Glib::ustring, NoteBase*> NoteMap;
NoteMap m_notes;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]