From b4f63cb4406c97cbceafd709ef53bd75dcac9d81 Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Sun, 20 Sep 2009 07:42:03 +0000 Subject: [PATCH] fixed Qt headers; removed WX11 defines; removed 'using namespace std' svn path=/trunk/KDE/kdebase/workspace/; revision=1025937 --- clients/oxygen/config/config.h | 2 +- clients/oxygen/config/itemmodel.cpp | 20 +++++++++---------- clients/oxygen/config/itemmodel.h | 2 +- .../oxygen/config/oxygenconfigurationui.cpp | 6 +++--- clients/oxygen/config/oxygenconfigurationui.h | 7 +++---- clients/oxygen/config/oxygendetectwidget.cpp | 10 +++++----- clients/oxygen/config/oxygendetectwidget.h | 8 ++++---- .../oxygen/config/oxygenexceptiondialog.cpp | 6 +++--- clients/oxygen/config/oxygenexceptiondialog.h | 2 +- .../config/oxygenexceptionlistwidget.cpp | 4 ++-- .../oxygen/config/oxygenexceptionlistwidget.h | 2 +- .../config/oxygenshadowconfigurationui.cpp | 4 ++-- .../config/oxygenshadowconfigurationui.h | 4 ++-- clients/oxygen/oxygen.cpp | 2 -- clients/oxygen/oxygen.h | 2 +- clients/oxygen/oxygenbutton.cpp | 4 ++-- clients/oxygen/oxygenbutton.h | 2 +- clients/oxygen/oxygenclient.cpp | 7 +++---- clients/oxygen/oxygenclient.h | 2 +- clients/oxygen/oxygenexception.h | 2 +- clients/oxygen/oxygenexceptionlist.cpp | 2 +- clients/oxygen/oxygenexceptionlist.h | 2 +- clients/oxygen/oxygenshadowcache.cpp | 2 +- clients/oxygen/oxygenshadowcache.h | 4 ++-- clients/oxygen/oxygenshadowconfiguration.h | 2 +- clients/oxygen/oxygensizegrip.cpp | 8 ++++---- clients/oxygen/oxygensizegrip.h | 6 +++--- clients/oxygen/x11util.cpp | 15 -------------- clients/oxygen/x11util.h | 14 ++----------- 29 files changed, 61 insertions(+), 92 deletions(-) diff --git a/clients/oxygen/config/config.h b/clients/oxygen/config/config.h index 49daa027e7..69d8a138e1 100644 --- a/clients/oxygen/config/config.h +++ b/clients/oxygen/config/config.h @@ -31,7 +31,7 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include +#include #include "oxygenconfigurationui.h" #include "../oxygenexceptionlist.h" diff --git a/clients/oxygen/config/itemmodel.cpp b/clients/oxygen/config/itemmodel.cpp index ceaaea5c58..3e166ea512 100644 --- a/clients/oxygen/config/itemmodel.cpp +++ b/clients/oxygen/config/itemmodel.cpp @@ -33,33 +33,31 @@ #include "itemmodel.h" -using namespace std; - namespace Oxygen { - + //_______________________________________________________________ ItemModel::ItemModel( QObject* parent ): QAbstractItemModel( parent ), sort_column_(0), sort_order_( Qt::AscendingOrder ) {} - + //____________________________________________________________ void ItemModel::sort( int column, Qt::SortOrder order ) { - + // store column and order sort_column_ = column; sort_order_ = order; - + // emit signals and call private methods emit layoutAboutToBeChanged(); _sort( column, order ); emit layoutChanged(); - + } - + //____________________________________________________________ QModelIndexList ItemModel::indexes( int column, const QModelIndex& parent ) const { @@ -72,9 +70,9 @@ namespace Oxygen out.push_back( index ); out += indexes( column, index ); } - + return out; - + } - + } diff --git a/clients/oxygen/config/itemmodel.h b/clients/oxygen/config/itemmodel.h index 565770b605..f2131cb92f 100644 --- a/clients/oxygen/config/itemmodel.h +++ b/clients/oxygen/config/itemmodel.h @@ -33,7 +33,7 @@ */ -#include +#include //! Job model. Stores job information for display in lists namespace Oxygen diff --git a/clients/oxygen/config/oxygenconfigurationui.cpp b/clients/oxygen/config/oxygenconfigurationui.cpp index df342465cd..a50efd269e 100644 --- a/clients/oxygen/config/oxygenconfigurationui.cpp +++ b/clients/oxygen/config/oxygenconfigurationui.cpp @@ -28,9 +28,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/clients/oxygen/config/oxygenconfigurationui.h b/clients/oxygen/config/oxygenconfigurationui.h index 8971a98bba..df70eb6957 100644 --- a/clients/oxygen/config/oxygenconfigurationui.h +++ b/clients/oxygen/config/oxygenconfigurationui.h @@ -26,11 +26,10 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include #include -#include -#include -#include +#include +#include +#include #include "oxygenshadowconfigurationui.h" #include "oxygenexceptionlistwidget.h" diff --git a/clients/oxygen/config/oxygendetectwidget.cpp b/clients/oxygen/config/oxygendetectwidget.cpp index ee2f841c8c..932b45b9d8 100644 --- a/clients/oxygen/config/oxygendetectwidget.cpp +++ b/clients/oxygen/config/oxygendetectwidget.cpp @@ -31,17 +31,17 @@ #include "oxygendetectwidget.moc" #include -#include -#include -#include +#include +#include +#include +#include #include -#include +#include #include #include #include #include -#include namespace Oxygen { diff --git a/clients/oxygen/config/oxygendetectwidget.h b/clients/oxygen/config/oxygendetectwidget.h index 8104c4341d..24e633c6b2 100644 --- a/clients/oxygen/config/oxygendetectwidget.h +++ b/clients/oxygen/config/oxygendetectwidget.h @@ -32,10 +32,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include diff --git a/clients/oxygen/config/oxygenexceptiondialog.cpp b/clients/oxygen/config/oxygenexceptiondialog.cpp index 0a4c406dad..7f50d97801 100644 --- a/clients/oxygen/config/oxygenexceptiondialog.cpp +++ b/clients/oxygen/config/oxygenexceptiondialog.cpp @@ -28,9 +28,9 @@ #include "oxygendetectwidget.h" #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/clients/oxygen/config/oxygenexceptiondialog.h b/clients/oxygen/config/oxygenexceptiondialog.h index 2713d95a3b..fa093f4d6d 100644 --- a/clients/oxygen/config/oxygenexceptiondialog.h +++ b/clients/oxygen/config/oxygenexceptiondialog.h @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include diff --git a/clients/oxygen/config/oxygenexceptionlistwidget.cpp b/clients/oxygen/config/oxygenexceptionlistwidget.cpp index 934ad5d117..df60b869e7 100644 --- a/clients/oxygen/config/oxygenexceptionlistwidget.cpp +++ b/clients/oxygen/config/oxygenexceptionlistwidget.cpp @@ -27,8 +27,8 @@ #include "oxygenexceptionlistwidget.moc" #include "oxygenexceptiondialog.h" -#include -#include +#include +#include #include #include diff --git a/clients/oxygen/config/oxygenexceptionlistwidget.h b/clients/oxygen/config/oxygenexceptionlistwidget.h index 14ff1e6912..3e3eaaadfe 100644 --- a/clients/oxygen/config/oxygenexceptionlistwidget.h +++ b/clients/oxygen/config/oxygenexceptionlistwidget.h @@ -26,8 +26,8 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include #include +#include #include "oxygenexceptionmodel.h" #include "../oxygenexceptionlist.h" diff --git a/clients/oxygen/config/oxygenshadowconfigurationui.cpp b/clients/oxygen/config/oxygenshadowconfigurationui.cpp index 129c3cea48..a19748f5a7 100644 --- a/clients/oxygen/config/oxygenshadowconfigurationui.cpp +++ b/clients/oxygen/config/oxygenshadowconfigurationui.cpp @@ -26,8 +26,8 @@ #include "oxygenshadowconfigurationui.h" #include -#include -#include +#include +#include namespace Oxygen { diff --git a/clients/oxygen/config/oxygenshadowconfigurationui.h b/clients/oxygen/config/oxygenshadowconfigurationui.h index d7e39b6241..06e1c6824a 100644 --- a/clients/oxygen/config/oxygenshadowconfigurationui.h +++ b/clients/oxygen/config/oxygenshadowconfigurationui.h @@ -25,8 +25,8 @@ // IN THE SOFTWARE. ////////////////////////////////////////////////////////////////////////////// -#include -#include +#include +#include #include #include diff --git a/clients/oxygen/oxygen.cpp b/clients/oxygen/oxygen.cpp index f0b1ceb03a..1b702ab970 100644 --- a/clients/oxygen/oxygen.cpp +++ b/clients/oxygen/oxygen.cpp @@ -34,8 +34,6 @@ #include #include #include -#include -#include extern "C" { diff --git a/clients/oxygen/oxygen.h b/clients/oxygen/oxygen.h index 00ee0af0c8..e140a94675 100644 --- a/clients/oxygen/oxygen.h +++ b/clients/oxygen/oxygen.h @@ -27,7 +27,7 @@ // IN THE SOFTWARE. ////////////////////////////////////////////////////////////////////////////// -#include +#include #include #include diff --git a/clients/oxygen/oxygenbutton.cpp b/clients/oxygen/oxygenbutton.cpp index 277cc1e92c..a5cbdb7b22 100644 --- a/clients/oxygen/oxygenbutton.cpp +++ b/clients/oxygen/oxygenbutton.cpp @@ -31,8 +31,8 @@ #include -#include -#include +#include +#include #include #include diff --git a/clients/oxygen/oxygenbutton.h b/clients/oxygen/oxygenbutton.h index b65eaa912c..e07a60dd04 100644 --- a/clients/oxygen/oxygenbutton.h +++ b/clients/oxygen/oxygenbutton.h @@ -29,7 +29,7 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include +#include #include "oxygen.h" #include "oxygenclient.h" diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index c4a78b7f6c..f69b51a536 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -42,11 +42,10 @@ #include #include -#include -#include -#include +#include +#include +#include -using namespace std; namespace Oxygen { diff --git a/clients/oxygen/oxygenclient.h b/clients/oxygen/oxygenclient.h index 3cfb3fed46..abaa3c5e40 100644 --- a/clients/oxygen/oxygenclient.h +++ b/clients/oxygen/oxygenclient.h @@ -29,7 +29,7 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include +#include #include "oxygenconfiguration.h" #include "lib/helper.h" diff --git a/clients/oxygen/oxygenexception.h b/clients/oxygen/oxygenexception.h index 4f709e7ae1..9da4c86aaf 100644 --- a/clients/oxygen/oxygenexception.h +++ b/clients/oxygen/oxygenexception.h @@ -26,7 +26,7 @@ // IN THE SOFTWARE. ////////////////////////////////////////////////////////////////////////////// -#include +#include #include "oxygenconfiguration.h" diff --git a/clients/oxygen/oxygenexceptionlist.cpp b/clients/oxygen/oxygenexceptionlist.cpp index 27f970dd35..0546b67a29 100644 --- a/clients/oxygen/oxygenexceptionlist.cpp +++ b/clients/oxygen/oxygenexceptionlist.cpp @@ -25,7 +25,7 @@ #include "oxygenexceptionlist.h" -#include +#include namespace Oxygen { diff --git a/clients/oxygen/oxygenexceptionlist.h b/clients/oxygen/oxygenexceptionlist.h index ef8dcf2283..a5641c5905 100644 --- a/clients/oxygen/oxygenexceptionlist.h +++ b/clients/oxygen/oxygenexceptionlist.h @@ -27,7 +27,7 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include +#include #include "oxygenexception.h" diff --git a/clients/oxygen/oxygenshadowcache.cpp b/clients/oxygen/oxygenshadowcache.cpp index 904c9f0010..7e99a413da 100644 --- a/clients/oxygen/oxygenshadowcache.cpp +++ b/clients/oxygen/oxygenshadowcache.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include namespace Oxygen { diff --git a/clients/oxygen/oxygenshadowcache.h b/clients/oxygen/oxygenshadowcache.h index 5420177df9..5183621096 100644 --- a/clients/oxygen/oxygenshadowcache.h +++ b/clients/oxygen/oxygenshadowcache.h @@ -27,8 +27,8 @@ // IN THE SOFTWARE. ////////////////////////////////////////////////////////////////////////////// -#include -#include +#include +#include #include "oxygenclient.h" #include "oxygenshadowconfiguration.h" diff --git a/clients/oxygen/oxygenshadowconfiguration.h b/clients/oxygen/oxygenshadowconfiguration.h index a7b648af9a..d8198f3c7a 100644 --- a/clients/oxygen/oxygenshadowconfiguration.h +++ b/clients/oxygen/oxygenshadowconfiguration.h @@ -27,7 +27,7 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include +#include namespace OxygenConfig { diff --git a/clients/oxygen/oxygensizegrip.cpp b/clients/oxygen/oxygensizegrip.cpp index f6d6905754..af170029de 100644 --- a/clients/oxygen/oxygensizegrip.cpp +++ b/clients/oxygen/oxygensizegrip.cpp @@ -29,14 +29,14 @@ #include "oxygenclient.h" #include -#include -#include -#include +#include +#include +#include #include #include "x11util.h" -#include +#include #include namespace Oxygen diff --git a/clients/oxygen/oxygensizegrip.h b/clients/oxygen/oxygensizegrip.h index 3e13932a0c..d0f455cfd9 100644 --- a/clients/oxygen/oxygensizegrip.h +++ b/clients/oxygen/oxygensizegrip.h @@ -26,9 +26,9 @@ // IN THE SOFTWARE. ////////////////////////////////////////////////////////////////////////////// -#include -#include -#include +#include +#include +#include namespace Oxygen { diff --git a/clients/oxygen/x11util.cpp b/clients/oxygen/x11util.cpp index 2c04fd4f43..e4b232fc80 100644 --- a/clients/oxygen/x11util.cpp +++ b/clients/oxygen/x11util.cpp @@ -25,8 +25,6 @@ #include "x11util.h" -using namespace std; - namespace Oxygen { @@ -47,8 +45,6 @@ namespace Oxygen bool X11Util::isSupported( const Atoms& atom ) { - #ifdef Q_WS_X11 - SupportedAtomMap::const_iterator iter( supportedAtoms().find( atom ) ); if( iter != supportedAtoms().end() ) return iter->second; @@ -88,8 +84,6 @@ namespace Oxygen supportedAtoms_[atom] = false; - #endif - return false; } @@ -103,8 +97,6 @@ namespace Oxygen Qt::MouseButton button ) { - #ifdef Q_WS_X11 - // check if( !isSupported( _NET_WM_MOVERESIZE ) ) return false; @@ -129,9 +121,6 @@ namespace Oxygen SubstructureRedirectMask | SubstructureNotifyMask, &event); return true; - #else - return false; - #endif } //________________________________________________________________________ @@ -145,8 +134,6 @@ namespace Oxygen return; } - #ifdef Q_WS_X11 - //________________________________________________________________________ Atom X11Util::findAtom( const Atoms& atom ) { @@ -164,5 +151,3 @@ namespace Oxygen } } - -#endif diff --git a/clients/oxygen/x11util.h b/clients/oxygen/x11util.h index 19863bacf0..98bc6a89db 100644 --- a/clients/oxygen/x11util.h +++ b/clients/oxygen/x11util.h @@ -26,15 +26,13 @@ // IN THE SOFTWARE. ////////////////////////////////////////////////////////////////////////////// -#include +#include #include -#ifdef Q_WS_X11 -#include +#include #include #include #include -#endif namespace Oxygen { @@ -76,13 +74,9 @@ namespace Oxygen /*! returns true on success */ bool moveResizeWidget( WId, int screen, QPoint, Direction, Qt::MouseButton button = Qt::LeftButton ); - #ifdef Q_WS_X11 - //! find atom Atom findAtom( const Atoms& atom ); - #endif - private: //! constructor @@ -109,8 +103,6 @@ namespace Oxygen SupportedAtomMap supportedAtoms_; - #ifdef Q_WS_X11 - //! atom map typedef std::map AtomMap; @@ -122,8 +114,6 @@ namespace Oxygen //! atoms AtomMap atoms_; - #endif - }; }