![]() Registered Member ![]()
|
I'd like to activate my appliacation when the network connection is ready. I have found this:
//test to see if networking is enabled on the system if(Solid::Networking::status() == Solid::Networking::Connected) { kDebug() << "Networking is enabled. Feel free to go online!"; } else { kDebug() << "Network not available."; } In both case ( if the eth cable is plugged or not ) the message is Network not available, else if i can surf the internet. What's wrong? |
![]() Administrator ![]()
|
Make sure that you consider Solid::Networking::Unknown to be connected as well. On some systems, it is not possible for KDE to determine if your system has an active network connection, in which case Unknown will be returned instead.
This functionality is most reliable on systems that use NetworkManager.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft