diff --git a/examples/plugin/custom_context_menu/CustomContext.cc b/examples/plugin/custom_context_menu/CustomContext.cc index e16fc98dd..21a2aa73a 100644 --- a/examples/plugin/custom_context_menu/CustomContext.cc +++ b/examples/plugin/custom_context_menu/CustomContext.cc @@ -35,5 +35,5 @@ CustomContext::~CustomContext() } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::CustomContext, - ignition::gui::Plugin); +IGNITION_ADD_PLUGIN(gui::CustomContext, + gui::Plugin); diff --git a/examples/plugin/dialog_from_plugin/DialogFromPlugin.cc b/examples/plugin/dialog_from_plugin/DialogFromPlugin.cc index 891ddd846..86abe2a4f 100644 --- a/examples/plugin/dialog_from_plugin/DialogFromPlugin.cc +++ b/examples/plugin/dialog_from_plugin/DialogFromPlugin.cc @@ -35,5 +35,5 @@ DialogFromPlugin::~DialogFromPlugin() } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::DialogFromPlugin, - ignition::gui::Plugin); +IGNITION_ADD_PLUGIN(gui::DialogFromPlugin, + gui::Plugin); diff --git a/examples/plugin/hello_plugin/HelloPlugin.cc b/examples/plugin/hello_plugin/HelloPlugin.cc index 4a980a45d..49674f5d6 100644 --- a/examples/plugin/hello_plugin/HelloPlugin.cc +++ b/examples/plugin/hello_plugin/HelloPlugin.cc @@ -53,5 +53,5 @@ void HelloPlugin::OnButton() } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::HelloPlugin, - ignition::gui::Plugin); +IGNITION_ADD_PLUGIN(gui::HelloPlugin, + gui::Plugin); diff --git a/examples/plugin/multiple_qml/MultipleQml.cc b/examples/plugin/multiple_qml/MultipleQml.cc index 0a82868b2..9651bf9e7 100644 --- a/examples/plugin/multiple_qml/MultipleQml.cc +++ b/examples/plugin/multiple_qml/MultipleQml.cc @@ -41,5 +41,5 @@ void MultipleQml::OnButton(const QString &_text) } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::MultipleQml, - ignition::gui::Plugin); +IGNITION_ADD_PLUGIN(gui::MultipleQml, + gui::Plugin); diff --git a/src/Application.cc b/src/Application.cc index 39f063cb1..77073ffdd 100644 --- a/src/Application.cc +++ b/src/Application.cc @@ -181,7 +181,7 @@ QQmlApplicationEngine *Application::Engine() const } ///////////////////////////////////////////////// -Application *ignition::gui::App() +Application *gui::App() { return qobject_cast(qGuiApp); } @@ -452,7 +452,7 @@ bool Application::LoadPlugin(const std::string &_filename, } // Go over all plugin names and get the first one that implements the - // ignition::gui::Plugin interface + // gui::Plugin interface plugin::PluginPtr commonPlugin; std::shared_ptr plugin{nullptr}; for (auto pluginName : pluginNames) @@ -461,7 +461,7 @@ bool Application::LoadPlugin(const std::string &_filename, if (!commonPlugin) continue; - plugin = commonPlugin->QueryInterfaceSharedPtr(); + plugin = commonPlugin->QueryInterfaceSharedPtr(); if (plugin) break; } @@ -482,7 +482,7 @@ bool Application::LoadPlugin(const std::string &_filename, if (!plugin) { ignerr << "Failed to load plugin [" << _filename << - "] : couldn't get [ignition::gui::Plugin] interface." + "] : couldn't get [gui::Plugin] interface." << std::endl; return false; } diff --git a/src/Application_TEST.cc b/src/Application_TEST.cc index c0ac12728..1e234e591 100644 --- a/src/Application_TEST.cc +++ b/src/Application_TEST.cc @@ -39,7 +39,7 @@ using namespace gui; ////////////////////////////////////////////////// TEST(ApplicationTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(Constructor)) { - ignition::common::Console::SetVerbosity(4); + common::Console::SetVerbosity(4); // No Qt app EXPECT_EQ(nullptr, qGuiApp); @@ -65,7 +65,7 @@ TEST(ApplicationTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(Constructor)) ////////////////////////////////////////////////// TEST(ApplicationTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(LoadPlugin)) { - ignition::common::Console::SetVerbosity(4); + common::Console::SetVerbosity(4); // No Qt app EXPECT_EQ(nullptr, qGuiApp); @@ -121,7 +121,7 @@ TEST(ApplicationTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(LoadPlugin)) EXPECT_TRUE(app.LoadPlugin("TestPlugin")); } - // Plugin which doesn't inherit from ignition::gui::Plugin + // Plugin which doesn't inherit from gui::Plugin { Application app(g_argc, g_argv); app.AddPluginPath(std::string(PROJECT_BINARY_PATH) + "/lib"); @@ -149,7 +149,7 @@ TEST(ApplicationTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(LoadPlugin)) ////////////////////////////////////////////////// TEST(ApplicationTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(LoadConfig)) { - ignition::common::Console::SetVerbosity(4); + common::Console::SetVerbosity(4); EXPECT_EQ(nullptr, qGuiApp); @@ -199,7 +199,7 @@ TEST(ApplicationTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(LoadConfig)) ////////////////////////////////////////////////// TEST(ApplicationTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(LoadDefaultConfig)) { - ignition::common::Console::SetVerbosity(4); + common::Console::SetVerbosity(4); EXPECT_EQ(nullptr, qGuiApp); @@ -208,12 +208,12 @@ TEST(ApplicationTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(LoadDefaultConfig)) Application app(g_argc, g_argv); // Add test plugin to path (referenced in config) - auto testBuildPath = ignition::common::joinPaths( + auto testBuildPath = common::joinPaths( std::string(PROJECT_BINARY_PATH), "lib"); app.AddPluginPath(testBuildPath); // Set default config file - auto configPath = ignition::common::joinPaths( + auto configPath = common::joinPaths( std::string(PROJECT_SOURCE_PATH), "test", "config", "test.config"); app.SetDefaultConfigPath(configPath); @@ -224,7 +224,7 @@ TEST(ApplicationTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(LoadDefaultConfig)) ////////////////////////////////////////////////// TEST(ApplicationTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(CreateMainWindow)) { - ignition::common::Console::SetVerbosity(4); + common::Console::SetVerbosity(4); EXPECT_EQ(nullptr, qGuiApp); @@ -307,7 +307,7 @@ TEST(ApplicationTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(CreateMainWindow)) ////////////////////////////////////////////////// TEST(ApplicationTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(Dialog)) { - ignition::common::Console::SetVerbosity(4); + common::Console::SetVerbosity(4); EXPECT_EQ(nullptr, qGuiApp); @@ -380,13 +380,13 @@ TEST(ApplicationTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(Dialog)) ///////////////////////////////////////////////// TEST(ApplicationTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(messageHandler)) { - ignition::common::Console::SetVerbosity(4); + common::Console::SetVerbosity(4); EXPECT_EQ(nullptr, qGuiApp); Application app(g_argc, g_argv); - // \todo Verify output, see ignition::commmon::Console_TEST for example + // \todo Verify output, see commmon::Console_TEST for example qDebug("This came from qDebug"); qInfo("This came from qInfo"); qWarning("This came from qWarning"); diff --git a/src/Conversions_TEST.cc b/src/Conversions_TEST.cc index 0960ddf99..7ab42ba39 100644 --- a/src/Conversions_TEST.cc +++ b/src/Conversions_TEST.cc @@ -156,7 +156,7 @@ TEST(ConversionsTest, Time) // Msgs to common to msgs { - ignition::msgs::Time t; + msgs::Time t; t.set_sec(s); t.set_nsec(ns); diff --git a/src/DragDropModel_TEST.cc b/src/DragDropModel_TEST.cc index a23f1c9b4..d5fbb45ee 100644 --- a/src/DragDropModel_TEST.cc +++ b/src/DragDropModel_TEST.cc @@ -30,7 +30,7 @@ using namespace gui; ///////////////////////////////////////////////// TEST(DragDropModelTest, Mime) { - ignition::common::Console::SetVerbosity(4); + common::Console::SetVerbosity(4); auto model = new DragDropModel(); ASSERT_TRUE(model != nullptr); diff --git a/src/MainWindow.cc b/src/MainWindow.cc index d6157010b..d4dd55851 100644 --- a/src/MainWindow.cc +++ b/src/MainWindow.cc @@ -76,7 +76,7 @@ namespace ignition public: std::string controlService{"/server_control"}; /// \brief Communication node - public: ignition::transport::Node node; + public: transport::Node node; }; } } @@ -86,7 +86,7 @@ using namespace gui; /// \brief Strip last component from a path. /// \return Original path without its last component. -/// \ToDo: Move this function to ignition::common::Filesystem +/// \ToDo: Move this function to common::Filesystem std::string dirName(const std::string &_path) { std::size_t found = _path.find_last_of("/\\"); @@ -99,7 +99,7 @@ MainWindow::MainWindow() { // Expose the ExitAction enum to QML via ExitAction 1.0 module qRegisterMetaType("ExitAction"); - qmlRegisterUncreatableMetaObject(ignition::gui::staticMetaObject, + qmlRegisterUncreatableMetaObject(gui::staticMetaObject, "ExitAction", 1, 0, "ExitAction", "Error: namespace enum"); // Make MainWindow functions available from all QML files (using root) @@ -211,7 +211,7 @@ void MainWindow::OnStopServer() } }; - ignition::msgs::ServerControl req; + msgs::ServerControl req; req.set_stop(true); const auto success = this->dataPtr->node.Request( this->dataPtr->controlService, req, cb); @@ -240,7 +240,7 @@ void MainWindow::SaveConfig(const std::string &_path) // Create the intermediate directories if needed. // We check for errors when we try to open the file. auto dirname = dirName(_path); - ignition::common::createDirectories(dirname); + common::createDirectories(dirname); // Open the file std::ofstream out(_path.c_str(), std::ios::out); diff --git a/src/Plugin_TEST.cc b/src/Plugin_TEST.cc index 4f8d94cca..93f6960eb 100644 --- a/src/Plugin_TEST.cc +++ b/src/Plugin_TEST.cc @@ -38,7 +38,7 @@ using namespace gui; // See https://github.com/ignitionrobotics/ign-gui/issues/75 TEST(PluginTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(DeleteLater)) { - ignition::common::Console::SetVerbosity(4); + common::Console::SetVerbosity(4); Application app(g_argc, g_argv); app.AddPluginPath(std::string(PROJECT_BINARY_PATH) + "/lib"); @@ -77,7 +77,7 @@ TEST(PluginTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(DeleteLater)) ///////////////////////////////////////////////// TEST(PluginTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(InvalidXmlText)) { - ignition::common::Console::SetVerbosity(4); + common::Console::SetVerbosity(4); Application app(g_argc, g_argv); app.AddPluginPath(std::string(PROJECT_BINARY_PATH) + "/lib"); @@ -107,7 +107,7 @@ TEST(PluginTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(InvalidXmlText)) ///////////////////////////////////////////////// TEST(PluginTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(Getters)) { - ignition::common::Console::SetVerbosity(4); + common::Console::SetVerbosity(4); Application app(g_argc, g_argv); app.AddPluginPath(std::string(PROJECT_BINARY_PATH) + "/lib"); @@ -139,7 +139,7 @@ TEST(PluginTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(Getters)) ///////////////////////////////////////////////// TEST(PluginTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(ConfigStr)) { - ignition::common::Console::SetVerbosity(4); + common::Console::SetVerbosity(4); Application app(g_argc, g_argv); app.AddPluginPath( @@ -238,7 +238,7 @@ TEST(PluginTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(ConfigStr)) ///////////////////////////////////////////////// TEST(PluginTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(ConfigStrInputNoPlugin)) { - ignition::common::Console::SetVerbosity(4); + common::Console::SetVerbosity(4); Application app(g_argc, g_argv); app.AddPluginPath( diff --git a/src/SearchModel_TEST.cc b/src/SearchModel_TEST.cc index 48c1318c2..da1061e73 100644 --- a/src/SearchModel_TEST.cc +++ b/src/SearchModel_TEST.cc @@ -43,7 +43,7 @@ int countRowsOfIndex(const QModelIndex &_index = QModelIndex()) ///////////////////////////////////////////////// TEST(SearchModelTest, FlatStructure) { - ignition::common::Console::SetVerbosity(4); + common::Console::SetVerbosity(4); // A source model auto sourceModel = new QStandardItemModel(); @@ -99,7 +99,7 @@ TEST(SearchModelTest, FlatStructure) ///////////////////////////////////////////////// TEST(SearchModelTest, NestedStructure) { - ignition::common::Console::SetVerbosity(4); + common::Console::SetVerbosity(4); // A source model auto sourceModel = new QStandardItemModel(); diff --git a/src/plugins/grid_3d/Grid3D_TEST.cc b/src/plugins/grid_3d/Grid3D_TEST.cc index 818bb35e3..63437ff2f 100644 --- a/src/plugins/grid_3d/Grid3D_TEST.cc +++ b/src/plugins/grid_3d/Grid3D_TEST.cc @@ -78,7 +78,7 @@ TEST(Grid3DTest, CRUD) tinyxml2::XMLDocument pluginDoc; pluginDoc.Parse(pluginStr); - EXPECT_TRUE(ignition::gui::loadPlugin("Grid3D", + EXPECT_TRUE(gui::loadPlugin("Grid3D", pluginDoc.FirstChildElement("plugin"))); // Create main window diff --git a/src/plugins/key_publisher/KeyPublisher.cc b/src/plugins/key_publisher/KeyPublisher.cc index 49194d915..89226be1b 100644 --- a/src/plugins/key_publisher/KeyPublisher.cc +++ b/src/plugins/key_publisher/KeyPublisher.cc @@ -38,10 +38,10 @@ namespace gui class KeyPublisherPrivate { /// \brief Node for communication - public: ignition::transport::Node node; + public: transport::Node node; /// \brief Publisher - public: ignition::transport::Node::Publisher pub; + public: transport::Node::Publisher pub; /// \brief Topic public: std::string topic = "keyboard/keypress"; @@ -50,7 +50,7 @@ namespace gui /// \param[in] key_press Pointer to the keyevent public: void KeyPub(QKeyEvent *_keyPress) { - ignition::msgs::Int32 Msg; + msgs::Int32 Msg; Msg.set_data(_keyPress->key()); pub.Publish(Msg); } @@ -65,7 +65,7 @@ using namespace gui; KeyPublisher::KeyPublisher(): Plugin(), dataPtr(new KeyPublisherPrivate) { // Advertise publisher node - this->dataPtr->pub = this->dataPtr->node.Advertise + this->dataPtr->pub = this->dataPtr->node.Advertise (this->dataPtr->topic); } @@ -80,8 +80,8 @@ void KeyPublisher::LoadConfig(const tinyxml2::XMLElement *) if (this->title.empty()) this->title = "Key publisher"; - ignition::gui::App()->findChild - ()->QuickWindow()->installEventFilter(this); + gui::App()->findChild + ()->QuickWindow()->installEventFilter(this); } ///////////////////////////////////////////////// @@ -96,5 +96,5 @@ bool KeyPublisher::eventFilter(QObject *_obj, QEvent *_event) } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::KeyPublisher, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gui::KeyPublisher, + gui::Plugin) diff --git a/src/plugins/topic_viewer/TopicViewer_TEST.cc b/src/plugins/topic_viewer/TopicViewer_TEST.cc index 38bb4c7d9..27ee57c68 100644 --- a/src/plugins/topic_viewer/TopicViewer_TEST.cc +++ b/src/plugins/topic_viewer/TopicViewer_TEST.cc @@ -116,7 +116,7 @@ TEST(TopicViewerTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Model)) EXPECT_NE(nullptr, win); // Get plugin - auto plugins = win->findChildren(); + auto plugins = win->findChildren(); ASSERT_EQ(plugins.size(), 1); auto plugin = plugins[0]; diff --git a/test/integration/ExamplesBuild_TEST.cc b/test/integration/ExamplesBuild_TEST.cc index bf97348b1..7c87b77c3 100644 --- a/test/integration/ExamplesBuild_TEST.cc +++ b/test/integration/ExamplesBuild_TEST.cc @@ -134,24 +134,24 @@ void ExamplesBuild::Build(const std::string &_type) // Path to examples of the given type auto examplesDir = std::string(PROJECT_SOURCE_PATH) + "/examples/" + _type; - ASSERT_TRUE(ignition::common::exists(examplesDir)); + ASSERT_TRUE(common::exists(examplesDir)); // Iterate over directory - ignition::common::DirIter endIter; - for (ignition::common::DirIter dirIter(examplesDir); + common::DirIter endIter; + for (common::DirIter dirIter(examplesDir); dirIter != endIter; ++dirIter) { - auto base = ignition::common::basename(*dirIter); + auto base = common::basename(*dirIter); // Source directory for this example auto sourceDir = examplesDir + "/" + base; - ASSERT_TRUE(ignition::common::exists(sourceDir)); + ASSERT_TRUE(common::exists(sourceDir)); igndbg << "Source: " << sourceDir << std::endl; // Create a temp build directory std::string tmpBuildDir; ASSERT_TRUE(createAndSwitchToTempDir(tmpBuildDir)); - EXPECT_TRUE(ignition::common::exists(tmpBuildDir)); + EXPECT_TRUE(common::exists(tmpBuildDir)); igndbg << "Build directory: " << tmpBuildDir<< std::endl; char cmd[1024]; diff --git a/test/integration/Examples_TEST.cc b/test/integration/Examples_TEST.cc index 086623973..346931086 100644 --- a/test/integration/Examples_TEST.cc +++ b/test/integration/Examples_TEST.cc @@ -42,7 +42,7 @@ TEST(ExampleTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Configs)) "examples", "config"); // Load each config file - ignition::common::DirIter endIter; + common::DirIter endIter; for (common::DirIter file(exampleConfigPath); file != endIter; ++file) { Application app(g_argc, g_argv); diff --git a/test/plugins/TestBadInheritancePlugin.cc b/test/plugins/TestBadInheritancePlugin.cc index 4e0608810..3c14ad2d1 100644 --- a/test/plugins/TestBadInheritancePlugin.cc +++ b/test/plugins/TestBadInheritancePlugin.cc @@ -35,5 +35,5 @@ TestBadInheritancePlugin::~TestBadInheritancePlugin() } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::TestBadInheritancePlugin, - ignition::gui::MainWindow) +IGNITION_ADD_PLUGIN(gui::TestBadInheritancePlugin, + gui::MainWindow) diff --git a/test/plugins/TestInvalidQmlPlugin.cc b/test/plugins/TestInvalidQmlPlugin.cc index c4b604799..1d20c76c2 100644 --- a/test/plugins/TestInvalidQmlPlugin.cc +++ b/test/plugins/TestInvalidQmlPlugin.cc @@ -34,5 +34,5 @@ TestInvalidQmlPlugin::~TestInvalidQmlPlugin() } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::TestInvalidQmlPlugin, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gui::TestInvalidQmlPlugin, + gui::Plugin) diff --git a/test/plugins/TestPlugin.cc b/test/plugins/TestPlugin.cc index 2ab156c00..9c2ed0563 100644 --- a/test/plugins/TestPlugin.cc +++ b/test/plugins/TestPlugin.cc @@ -35,5 +35,5 @@ TestPlugin::~TestPlugin() } // Register this plugin -IGNITION_ADD_PLUGIN(ignition::gui::TestPlugin, - ignition::gui::Plugin) +IGNITION_ADD_PLUGIN(gui::TestPlugin, + gui::Plugin)