Commit bd2e30e1 authored by Laurent Montel's avatar Laurent Montel 😁

Use namespace

parent f75e108b
......@@ -26,6 +26,8 @@
#include <QVariantList>
#include <QStandardPaths>
using namespace Akonadi;
AddressesLocationGrantleeFormater::AddressesLocationGrantleeFormater(QObject *parent)
: QObject(parent),
mEngine(new Grantlee::Engine),
......
......@@ -32,6 +32,8 @@ namespace Grantlee
{
class Engine;
}
namespace Akonadi
{
class AddressesLocationGrantleeFormater : public QObject
{
Q_OBJECT
......@@ -50,5 +52,5 @@ private:
Grantlee::Template mSelfcontainedTemplate;
bool mReadOnly;
};
}
#endif // ADDRESSESLOCATIONGRANTLEEFORMATER_H
......@@ -28,6 +28,8 @@
#include <QWebSettings>
#include <QDebug>
using namespace Akonadi;
AddressesLocationViewer::AddressesLocationViewer(QWidget *parent)
: QWebView(parent),
mAddressesLocationGrantleeFormatter(new AddressesLocationGrantleeFormater(this))
......
......@@ -26,6 +26,8 @@
#include <QWebView>
#include <KContacts/Address>
namespace Akonadi
{
class AddressesLocationGrantleeFormater;
class AddressesLocationViewer : public QWebView
{
......@@ -55,5 +57,5 @@ private:
KContacts::Address::List mAddresses;
AddressesLocationGrantleeFormater *mAddressesLocationGrantleeFormatter;
};
}
#endif // ADDRESSESLOCATIONVIEWER_H
......@@ -24,6 +24,7 @@
#include "addresseslocationwidget.h"
#include "addresseslocationviewer.h"
#include "addresslocationwidget.h"
using namespace Akonadi;
AddressesLocationWidget::AddressesLocationWidget(QWidget *parent)
: QSplitter(parent)
......
......@@ -26,6 +26,8 @@
#include <QSplitter>
#include <KContacts/Addressee>
namespace Akonadi
{
class AddressesLocationViewer;
class AddressLocationWidget;
class AddressesLocationWidget : public QSplitter
......@@ -43,5 +45,5 @@ private:
AddressesLocationViewer *mAddressesLocationViewer;
AddressLocationWidget *mAddressLocationWidget;
};
}
#endif // ADDRESSESLOCATIONWIDGET_H
......@@ -25,7 +25,7 @@
#include <KIconLoader>
#include <KLocalizedString>
#include <QUrlQuery>
using namespace Akonadi;
AddressGrantleeObject::AddressGrantleeObject(const KContacts::Address &address, int addressIndex, QObject *parent)
: QObject(parent),
mAddress(address),
......
......@@ -25,6 +25,8 @@
#include <QObject>
#include <KContacts/Address>
namespace Akonadi
{
class AddressGrantleeObject : public QObject
{
Q_OBJECT
......@@ -63,5 +65,5 @@ private:
int mAddressIndex;
int mIconSize;
};
}
#endif // ADDRESSGRANTLEEOBJECT_H
......@@ -34,7 +34,7 @@
#include <QPushButton>
#include <QDebug>
#include <QStackedWidget>
using namespace Akonadi;
struct LocaleAwareLessThan : std::binary_function<QString, QString, bool> {
bool operator()(const QString &s1, const QString &s2) const
{
......
......@@ -31,6 +31,8 @@ class QCheckBox;
class KLineEdit;
class KComboBox;
class QPushButton;
namespace Akonadi
{
class SelectAddressTypeComboBox;
class AddressLocationWidget : public QWidget
{
......@@ -82,5 +84,5 @@ private:
int mCurrentAddress;
Mode mCurrentMode;
};
}
#endif // ADDRESSLOCATIONWIDGET_H
......@@ -27,7 +27,7 @@
#include <QGroupBox>
#include <QCheckBox>
#include <QButtonGroup>
using namespace Akonadi;
AddressTypeDialog::AddressTypeDialog(KContacts::Address::Type type, QWidget *parent)
: QDialog(parent)
{
......
......@@ -31,6 +31,8 @@ class QButtonGroup;
*
* @note This dialog is only used by AddressTypeCombo.
*/
namespace Akonadi
{
class AddressTypeDialog : public QDialog
{
public:
......@@ -44,5 +46,6 @@ private:
KContacts::Address::TypeList mTypeList;
};
}
#endif // ADDRESSTYPEDIALOG_H
......@@ -23,7 +23,7 @@
#include "addresseslocationviewertest.h"
#include "../addresseslocationviewer.h"
#include <QTest>
using namespace Akonadi;
AddressesLocationViewerTest::AddressesLocationViewerTest(QObject *parent)
: QObject(parent)
{
......
......@@ -25,7 +25,7 @@
#include <QTest>
#include <editor/addresseditor/addresseslocationviewer.h>
#include <editor/addresseditor/addresslocationwidget.h>
using namespace Akonadi;
AddressesLocationWidgetTest::AddressesLocationWidgetTest(QObject *parent)
: QObject(parent)
{
......
......@@ -30,7 +30,7 @@
#include <QTest>
#include <QCheckBox>
#include <editor/addresseditor/selectaddresstypecombobox.h>
using namespace Akonadi;
AddressLocationWidgetTest::AddressLocationWidgetTest(QObject *parent)
: QObject(parent)
{
......
......@@ -20,7 +20,7 @@
#include "iconnamecache_p.h"
#include <KIconLoader>
using namespace Akonadi;
Q_GLOBAL_STATIC(IconNameCache, s_iconNameCache)
IconNameCache *IconNameCache::instance()
......
......@@ -28,6 +28,8 @@
*
* The IconNameCache caches the result of iconPath() in a map and solves the slowness.
*/
namespace Akonadi
{
class IconNameCache
{
public:
......@@ -48,5 +50,5 @@ private:
mutable QMap<Entry, QString> mCachedEntries;
};
}
#endif
......@@ -25,7 +25,7 @@
#include "selectaddresstypecombobox.h"
#include <KLocalizedString>
#include <autoqpointer_p.h>
using namespace Akonadi;
SelectAddressTypeComboBox::SelectAddressTypeComboBox(QWidget *parent)
: KComboBox(parent)
, mType(KContacts::Address::Home)
......
......@@ -30,6 +30,8 @@
/**
* @short A widget for selecting the type of an address.
*/
namespace Akonadi
{
class SelectAddressTypeComboBox : public KComboBox
{
Q_OBJECT
......@@ -69,5 +71,5 @@ private:
int mLastSelected;
QList<int> mTypeList;
};
}
#endif
......@@ -24,7 +24,7 @@
#include <QApplication>
#include "../addresseslocationwidget.h"
using namespace Akonadi;
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
......
......@@ -100,7 +100,7 @@ public:
QCheckBox *mAllowRemoteContent;
// widgets from addresses group
AddressesLocationWidget *mAddressesLocationWidget;
Akonadi::AddressesLocationWidget *mAddressesLocationWidget;
// widgets from general group
ImageWidget *mLogoWidget;
......@@ -284,7 +284,7 @@ void ContactEditorWidget::Private::initGuiContactTab()
void ContactEditorWidget::Private::initGuiLocationTab()
{
mAddressesLocationWidget = new AddressesLocationWidget;
mAddressesLocationWidget = new Akonadi::AddressesLocationWidget;
mTabWidget->addTab(mAddressesLocationWidget, i18nc("@title:tab", "Location"));
}
......
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