[gtksourceviewmm] Fix make check.
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceviewmm] Fix make check.
- Date: Thu, 3 Feb 2011 21:11:09 +0000 (UTC)
commit f41c9830ff9a6d4c5fb4f7d6f909a5840cea663b
Author: Krzesimir Nowak <qdlacz gmail com>
Date: Thu Feb 3 22:03:47 2011 +0100
Fix make check.
* tests/completion.main.cc: Use vector instead of list. Also the
vector now keeps pointers to instances of base class.
* tests/langs/main.cc: Use vector instead of list.
tests/completion/main.cc | 5 +++--
tests/langs/main.cc | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/tests/completion/main.cc b/tests/completion/main.cc
index f06b253..3192da6 100644
--- a/tests/completion/main.cc
+++ b/tests/completion/main.cc
@@ -1,5 +1,5 @@
// standard
-#include <list>
+#include <vector>
// glibmm
#include <glibmm.h>
// gdkmm
@@ -40,7 +40,7 @@ private:
//virtual int get_interactive_delay_vfunc() const;
virtual int get_priority_vfunc() const;
- std::list<Glib::RefPtr<Gsv::SourceCompletionItem> > m_proposals;
+ std::vector<Glib::RefPtr<Gsv::SourceCompletionProposal> > m_proposals;
int m_priority;
Glib::ustring m_name;
Glib::RefPtr<Gdk::Pixbuf> m_pixbuf;
@@ -69,6 +69,7 @@ TestProvider::TestProvider()
Glib::Object(),
Gsv::SourceCompletionProvider()
{
+ m_proposals.reserve(3);
m_proposals.push_back( Gsv::SourceCompletionItem::create( "Proposal 1", "Proposal 1", get_icon_vfunc(), "" ) );
m_proposals.push_back( Gsv::SourceCompletionItem::create( "Proposal 2", "Proposal 2", get_icon_vfunc(), "" ) );
m_proposals.push_back( Gsv::SourceCompletionItem::create( "Proposal 3", "Proposal 3", get_icon_vfunc(), "" ) );
diff --git a/tests/langs/main.cc b/tests/langs/main.cc
index f53f57f..be5ea11 100644
--- a/tests/langs/main.cc
+++ b/tests/langs/main.cc
@@ -15,10 +15,10 @@ main (int argc, char **argv)
Glib::RefPtr<SourceLanguageManager> language_manager =
SourceLanguageManager::create();
- vector<Glib::ustring > langs = language_manager->get_language_ids ();
+ vector<string> langs = language_manager->get_language_ids ();
cout << "number of languages found: " << langs.size () << std::endl;;
- for (vector<Glib::ustring>::const_iterator iter = langs.begin(); iter != langs.end (); ++iter) {
+ for (vector<string>::const_iterator iter = langs.begin(); iter != langs.end (); ++iter) {
if (!(iter->empty())) {
Glib::RefPtr<SourceLanguage> lang = language_manager->get_language (*iter);
cout << "language: " << lang->get_name () << std::endl;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]