[gnote] Remove string_index_of from bugzilla



commit cec99e1523217a1824f2c3ed6f8e320e2a528056
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sun Jan 22 20:47:08 2017 +0200

    Remove string_index_of from bugzilla

 src/addins/bugzilla/bugzillapreferences.cpp |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/addins/bugzilla/bugzillapreferences.cpp b/src/addins/bugzilla/bugzillapreferences.cpp
index 55c46e7..a45b5eb 100644
--- a/src/addins/bugzilla/bugzillapreferences.cpp
+++ b/src/addins/bugzilla/bugzillapreferences.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2011,2013-2014 Aurimas Cernius
+ * Copyright (C) 2011,2013-2014,2017 Aurimas Cernius
  * Copyright (C) 2010 Debarshi Ray
  * Copyright (C) 2009 Hubert Figuiere
  *
@@ -173,19 +173,19 @@ namespace bugzilla {
 
   std::string BugzillaPreferences::parse_host(const sharp::FileInfo & file_info)
   {
-    std::string name = file_info.get_name();
-    std::string ext = file_info.get_extension();
+    Glib::ustring name = file_info.get_name();
+    Glib::ustring ext = file_info.get_extension();
 
     if (ext.empty()) {
       return "";
     }
 
-    int ext_pos = sharp::string_index_of(name, ext);
+    int ext_pos = name.find(ext);
     if (ext_pos <= 0) {
       return "";
     }
 
-    std::string host = sharp::string_substring(name, 0, ext_pos);
+    Glib::ustring host = sharp::string_substring(name, 0, ext_pos);
     if (host.empty()) {
       return "";
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]