So, I make this connection of a timer:
main.cpp:
Qt Code:
  1. connect(this, SIGNAL(timeout()), Global, SLOT(connected_to_internet()));
To copy to clipboard, switch view to plain text mode 
which is done inside the class of itself (that's why the 'this' in the 1st argument).

Now, I want to connect this timer with a static bool function called connected_to_internet() declared in a header file like this:
glob.h:
Qt Code:
  1. class Global{
  2. public:
  3. static bool connected_to_internet(){
  4. QProcess *connected = new QProcess(0);
  5. QString exec="ping";
  6. QStringList params;
  7. params << "-c" << "1" << "www.google.com";
  8. connected->start(exec,params);
  9. if(!connected->waitForFinished())
  10. return false;
  11. int exitcode=connected->exitCode();
  12. delete connected;
  13. if(!exitcode){
  14. qDebug() << "CONNECTED!\n";
  15. return true;
  16. }
  17. else{
  18. qDebug() << "NOT CONNECTED!\n";
  19. return false;
  20. }
  21. }
  22. };
To copy to clipboard, switch view to plain text mode 

Do I do anything wrong here?
The compiler complains about the connection I do that:
Qt Code:
  1. /home/alex/Workstation/test-build-desktop/../test-1.0/main.cpp:263: error: expected primary-expression before ‘,’ token
To copy to clipboard, switch view to plain text mode