diff options
author | Denis Shienkov <scapig@yandex.ru> | 2012-08-06 13:16:29 +0400 |
---|---|---|
committer | Denis Shienkov <scapig@yandex.ru> | 2012-08-06 11:42:18 +0200 |
commit | 86cbf1709325427df0c8ed0d61f9e29f07c67e1c (patch) | |
tree | 94bc79d9f2c280a971c99444b55fc9ad6ae67ea6 | |
parent | c48a31d94f5a5dc84ed337414bc6e2efeb1fafb6 (diff) | |
download | qtserialport-86cbf1709325427df0c8ed0d61f9e29f07c67e1c.tar.gz |
Move all dependent variables and methods to SerialPort namespace
All static functions, variables, and so forth, which belong to the addon moved into the namespace.
Change-Id: I47268449f425e359f490776d28df4da2bec50fd5
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Denis Shienkov <scapig@yandex.ru>
-rwxr-xr-x | src/serialportengine_symbian.cpp | 4 | ||||
-rwxr-xr-x | src/serialportinfo_symbian.cpp | 3 | ||||
-rwxr-xr-x | src/serialportinfo_unix.cpp | 5 | ||||
-rwxr-xr-x | src/serialportinfo_win.cpp | 3 | ||||
-rw-r--r-- | src/ttylocker_unix.cpp | 5 |
5 files changed, 7 insertions, 13 deletions
diff --git a/src/serialportengine_symbian.cpp b/src/serialportengine_symbian.cpp index 2b2dcdf..8a17391 100755 --- a/src/serialportengine_symbian.cpp +++ b/src/serialportengine_symbian.cpp @@ -71,6 +71,8 @@ #include <QtCore/qregexp.h> +QT_BEGIN_NAMESPACE_SERIALPORT + // Physical device driver. #ifdef __WINS__ _LIT(KPddName, "ECDRV"); @@ -117,8 +119,6 @@ static bool loadDevices() return true; } -QT_BEGIN_NAMESPACE_SERIALPORT - /*! Constructs a SymbianSerialPortEngine and initializes all internal variables to their initial values. The pointer \a d to the private object of class diff --git a/src/serialportinfo_symbian.cpp b/src/serialportinfo_symbian.cpp index 8ab8d11..c2f3fcc 100755 --- a/src/serialportinfo_symbian.cpp +++ b/src/serialportinfo_symbian.cpp @@ -52,6 +52,7 @@ #include <QtCore/qobject.h> +QT_BEGIN_NAMESPACE_SERIALPORT // Physical device driver. #ifdef __WINS__ @@ -98,8 +99,6 @@ static bool loadDevices() return true; } -QT_BEGIN_NAMESPACE_SERIALPORT - QList<SerialPortInfo> SerialPortInfo::availablePorts() { QList<SerialPortInfo> ports; diff --git a/src/serialportinfo_unix.cpp b/src/serialportinfo_unix.cpp index 5f454c6..95691e2 100755 --- a/src/serialportinfo_unix.cpp +++ b/src/serialportinfo_unix.cpp @@ -70,7 +70,7 @@ extern "C" #include <QtCore/qregexp.h> #include <QtCore/qfile.h> - +QT_BEGIN_NAMESPACE_SERIALPORT #if defined (Q_OS_LINUX) && defined (HAVE_LIBUDEV) @@ -116,9 +116,6 @@ inline QStringList& filtersOfDevices() #endif -QT_BEGIN_NAMESPACE_SERIALPORT - - QList<SerialPortInfo> SerialPortInfo::availablePorts() { QList<SerialPortInfo> ports; diff --git a/src/serialportinfo_win.cpp b/src/serialportinfo_win.cpp index 6664590..fb892a2 100755 --- a/src/serialportinfo_win.cpp +++ b/src/serialportinfo_win.cpp @@ -55,6 +55,7 @@ #include <QtCore/qvariant.h> #include <QtCore/qstringlist.h> +QT_BEGIN_NAMESPACE_SERIALPORT static const GUID guidsArray[] = { @@ -268,8 +269,6 @@ static QString findDescription(HKEY parentKeyHandle, const QString &subKey) #endif -QT_BEGIN_NAMESPACE_SERIALPORT - QList<SerialPortInfo> SerialPortInfo::availablePorts() { QList<SerialPortInfo> ports; diff --git a/src/ttylocker_unix.cpp b/src/ttylocker_unix.cpp index 67f3611..3e36d67 100644 --- a/src/ttylocker_unix.cpp +++ b/src/ttylocker_unix.cpp @@ -58,6 +58,8 @@ # include <QtCore/qstringlist.h> #endif // defined (HAVE_BAUDBOY_H) +QT_BEGIN_NAMESPACE_SERIALPORT + #if !(defined (HAVE_BAUDBOY_H) || defined (HAVE_LOCKDEV_H)) static @@ -97,9 +99,6 @@ QString generateLockFileNameAsNamedForm(const char *portName) #endif //!(defined (HAVE_BAUDBOY_H) || defined (HAVE_LOCKDEV_H)) - -QT_BEGIN_NAMESPACE_SERIALPORT - // Try lock serial device. However, other processes can not access it. bool TtyLocker::lock(const char *portName) { |