41 #include <QFormLayout>
42 #include <QMessageBox>
92 if (
field(
"ServerName").toString() ==
""
93 ||
field(
"User").toString() ==
""
94 ||
field(
"Password").toString() ==
"" )
98 tr(
"Please fill all the fields.") );
107 tr(
"Unable to connect to the server: please make sure you entered the right fields.") );
112 if ( ListGoDB.empty() )
117 "You have not yet set up your Gofigure Database\nPlease go to the menu 'Settings' and select 'Set Up Database'.") );
123 if ( ListGoDB.size() > 1 )
125 std::cout <<
"There is more than one Gofigure DataBase" << std::endl;
126 std::cout <<
"Debug: In " << __FILE__ <<
", line " << __LINE__;
127 std::cout << std::endl;
131 std::list< std::string >::iterator i = ListGoDB.begin();
132 std::string DBName = *i;
167 std::list< std::string > ListGoDB;
168 for (
unsigned int i = 0; i < vectListDB.size(); ++i )
173 field(
"ServerName").toString().toStdString(),
174 field(
"User").toString().toStdString(),
175 field(
"Password").toString().toStdString(), vectListDB[i]);
176 if ( !DatabaseConnection.first )
178 std::cout <<
"Cannot check if " << vectListDB[i].c_str()
183 std::cout <<
"Debug: In " << __FILE__ <<
", line " << __LINE__;
184 std::cout << std::endl;
189 ListGoDB.push_back(vectListDB[i]);
191 DatabaseConnection.second->Close();
192 DatabaseConnection.second->Delete();
218 field(
"ServerName").toString().toStdString(),
219 field(
"User").toString().toStdString(),
220 field(
"Password").toString().toStdString() );