Commit f15d5753 authored by Jan Grulich's avatar Jan Grulich
Browse files

Make it compilable with the old libmm-qt

parent 344b2be3
......@@ -25,9 +25,14 @@
#include <NetworkManagerQt/ActiveConnection>
#include <NetworkManagerQt/WirelessNetwork>
#if WITH_MODEMMANAGER_SUPPORT
#ifdef MODEMMANAGERQT_ONE
#include <ModemManagerQt/modem.h>
#include "config.h"
#else
#include <ModemManagerQt/modemgsmnetworkinterface.h>
#endif
#endif
#include "config.h"
class ConnectionIcon : public QObject
{
......
......@@ -29,9 +29,15 @@
#include <NetworkManagerQt/WirelessNetwork>
#include <NetworkManagerQt/WirelessDevice>
#if WITH_MODEMMANAGER_SUPPORT
#ifdef MODEMMANAGERQT_ONE
#include <ModemManagerQt/modem.h>
#include "config.h"
#else
#include <ModemManagerQt/modeminterface.h>
#endif
#endif
#include "config.h"
class Monitor : public QObject
{
Q_OBJECT
......
......@@ -230,7 +230,7 @@ void BluetoothMonitor::modemAdded(const QString &udi)
ModemManager::Modem::Ptr modem = modemDevice->interface(ModemManager::ModemDevice::ModemInterface).objectCast<ModemManager::Modem>();
#else
ModemManager::ModemInterface::Ptr modemDevice = ModemManager::findModemInterface(udi, ModemManager::ModemInterface::GsmCard);
ModemManager::ModemInterface::Ptr modem = ModemManager::findModemInterface(udi, ModemManager::ModemInterface::GsmCard);
if (!modem) {
// Try CDMA if no GSM device has been found.
......
......@@ -34,6 +34,8 @@
#include <ModemManagerQt/modemdevice.h>
#include <ModemManagerQt/modem.h>
#include <ModemManagerQt/sim.h>
#else
#include <ModemManagerQt/modemgsmcardinterface.h>
#endif
#include "pindialog.h"
......
......@@ -25,8 +25,8 @@
#include <QObject>
#include <QDBusPendingCallWatcher>
#include <ModemManager/ModemManager.h>
#ifdef MODEMMANAGERQT_ONE
#include <ModemManager/ModemManager.h>
#include <ModemManagerQt/modem.h>
#endif
#include <kdemacros.h>
......
......@@ -33,7 +33,11 @@
#include <NetworkManagerQt/ModemDevice>
#include <ModemManagerQt/manager.h>
#ifdef MODEMMANAGERQT_ONE
#include <ModemManagerQt/modem.h>
#else
#include <ModemManagerQt/modeminterface.h>
#endif
#define NUMBER_OF_STATIC_ENTRIES 3
......@@ -320,7 +324,7 @@ void MobileConnectionWizard::introAddDevice(const NetworkManager::Device::Ptr &d
}
}
#else
ModemManager::ModemInterface modem = ModemManager::findModemInterface(device->udi(), ModemManager::ModemInterface::GsmCard);
ModemManager::ModemInterface::Ptr modem = ModemManager::findModemInterface(device->udi(), ModemManager::ModemInterface::GsmCard);
if (modem) {
if (modem->enabled()) {
desc.append(modem->getInfo().manufacturer);
......
......@@ -967,9 +967,9 @@ QString UiUtils::bluetoothDetails(const BluetoothDevice::Ptr& btDevice, const QS
QString UiUtils::modemDetails(const ModemDevice::Ptr& modemDevice, const QStringList& keys)
{
#if WITH_MODEMMANAGER_SUPPORT
#ifdef MODEMMANAGERQT_ONE
QString format = "<tr><td align=\"right\" width=\"50%\"><b>%1</b></td><td align=\"left\" width=\"50%\">&nbsp;%2</td></tr>";
QString details;
#ifdef MODEMMANAGERQT_ONE
ModemManager::Modem::Ptr modemNetwork;
ModemManager::Modem3gpp::Ptr gsmNet;
ModemManager::ModemCdma::Ptr cdmaNet;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment