]> git.sesse.net Git - vlc/commitdiff
Qt: Remove unneeded stuffs from qt4.hpp
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 29 Dec 2008 17:40:21 +0000 (18:40 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 30 Dec 2008 12:19:35 +0000 (13:19 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
12 files changed:
modules/gui/qt4/Modules.am
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/components/preferences_widgets.cpp
modules/gui/qt4/dialogs/help.cpp
modules/gui/qt4/dialogs/playlist.cpp
modules/gui/qt4/dialogs/sout.cpp
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/qt4.hpp
modules/gui/qt4/util/input_slider.hpp
modules/gui/qt4/util/qt_dirs.hpp [new file with mode: 0644]
modules/gui/qt4/util/qvlcapp.hpp

index 5e2f7c453c97c81b658eb4f00a8a5661a35ccf92..197a2d7fa83677cc9b2871fc985610e77d38d386 100644 (file)
@@ -259,6 +259,7 @@ noinst_HEADERS = \
        util/customwidgets.hpp \
        util/qvlcframe.hpp \
        util/qvlcapp.hpp \
+       util/qt_dirs.hpp \
        util/registry.hpp
 
 EXTRA_DIST += \
index b3368c8fdb8e47fa4d9bfdbd4a189b3481cc2cb6..f62c1683d05c99c067162c7bb77e6991cf068d3c 100644 (file)
@@ -34,6 +34,7 @@
 #include "components/open_panels.hpp"
 #include "dialogs/open.hpp"
 #include "dialogs_provider.hpp" /* Open Subtitle file */
+#include "util/qt_dirs.hpp"
 
 #include <QFileDialog>
 #include <QDialogButtonBox>
index 5d8e3b849e4d3dec06b89ee63c7e7a19dc332dd7..501a6aa1cd4d8118e7e6b0288be027c33d5bc396 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "components/preferences_widgets.hpp"
 #include "util/customwidgets.hpp"
+#include "util/qt_dirs.hpp"
 #include <vlc_keys.h>
 
 #include <QString>
index caae1d21b3984f29f9635e4d78339081150a0c73..21ce3da1bcf2edc924a0018777095abb147f172a 100644 (file)
@@ -27,6 +27,7 @@
 #endif
 
 #include "dialogs/help.hpp"
+#include "util/qt_dirs.hpp"
 
 #include <vlc_about.h>
 #include <vlc_intf_strings.h>
index 3ed3cf4450bb78a8aa3ab77b00c569e0340e5e6a..c652396f9f8b559a3a40367846fed049db8b4fb6 100644 (file)
@@ -28,6 +28,8 @@
 
 #include "components/playlist/playlist.hpp"
 
+#include "util/qt_dirs.hpp"
+
 #include <QUrl>
 #include <QHBoxLayout>
 
index b1733547386f09f47100a2e7826839c0c82cc4ff..e07aafe881c3f587bcb0a54d5ab8363ac9ce49a6 100644 (file)
@@ -32,6 +32,7 @@
 #endif
 
 #include "dialogs/sout.hpp"
+#include "util/qt_dirs.hpp"
 
 #include <QString>
 #include <QFileDialog>
index e3bd5d7365d304819109bdd4cdef1b7568599e5f..29dbad3339a0331bc93277502e230e0bbf2efea0 100644 (file)
@@ -33,7 +33,7 @@
 #include "input_manager.hpp" /* Load Subtitles */
 #include "menus.hpp"
 #include "recents.hpp"
-#include "util/qvlcapp.hpp" /* DialogEvent */
+#include "util/qt_dirs.hpp"
 
 /* The dialogs */
 #include "dialogs/playlist.hpp"
index 12e6bb058ea304a4f0a868273dd70a56640b0eea..7ea23020d14dbe08f78a968f392b2ab38c699fe1 100644 (file)
@@ -33,7 +33,7 @@
 #include "input_manager.hpp"
 
 #include "util/customwidgets.hpp"
-#include "util/qvlcapp.hpp" /* DialogEvent defintion */
+#include "util/qt_dirs.hpp"
 
 #include "components/interface_widgets.hpp"
 #include "components/controller.hpp"
index 3ba526baa21dc9b9ad39acef5b534fcf45d2a636..cf27ae25f01b246ea5b22237a26b54957150108c 100644 (file)
@@ -115,27 +115,4 @@ struct intf_sys_t
 #define getSettings() p_intf->p_sys->mainSettings
 
 
-#include <QString>
-/* Replace separators on Windows because Qt is always using / */
-static inline QString toNativeSeparators( QString s )
-{
-#ifdef WIN32
-    for (int i=0; i<(int)s.length(); i++)
-    {
-        if (s[i] == QLatin1Char('/'))
-            s[i] = QLatin1Char('\\');
-    }
-#endif
-    return s;
-}
-
-static inline QString removeTrailingSlash( QString s )
-{
-    if( ( s.length() > 1 ) && ( s[s.length()-1] == QLatin1Char( '/' ) ) )
-        s.remove( s.length() - 1, 1 );
-    return s;
-}
-
-#define toNativeSepNoSlash( a ) toNativeSeparators( removeTrailingSlash( a ) )
-
 #endif
index 4ebf5fe3885dcbe7c271bdca2551766b547f8b7f..1e6ec6ae9ef0d3acc09554dd0f31157b76856257 100644 (file)
@@ -27,7 +27,6 @@
 
 #include "qt4.hpp"
 
-#include <QAbstractSlider>
 #include <QSlider>
 
 #include <QMouseEvent>
diff --git a/modules/gui/qt4/util/qt_dirs.hpp b/modules/gui/qt4/util/qt_dirs.hpp
new file mode 100644 (file)
index 0000000..c2af9ce
--- /dev/null
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * dirs.hpp : String Directory helpers
+ ****************************************************************************
+ * Copyright (C) 2006-2008 the VideoLAN team
+ * $Id$
+ *
+ * Authors:       Jean-Baptiste Kempf <jb@videolan.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef _QT_DIR_H_
+#define _QT_DIR_H_
+
+#include <QString>
+/* Replace separators on Windows because Qt is always using / */
+static inline QString toNativeSeparators( QString s )
+{
+#ifdef WIN32
+    for (int i=0; i<(int)s.length(); i++)
+    {
+        if (s[i] == QLatin1Char('/'))
+            s[i] = QLatin1Char('\\');
+    }
+#endif
+    return s;
+}
+
+static inline QString removeTrailingSlash( QString s )
+{
+    if( ( s.length() > 1 ) && ( s[s.length()-1] == QLatin1Char( '/' ) ) )
+        s.remove( s.length() - 1, 1 );
+    return s;
+}
+
+#define toNativeSepNoSlash( a ) toNativeSeparators( removeTrailingSlash( a ) )
+
+#endif
+
index 6cb9fab990c12f7ef82f8f4b398b1191a1c3c994..a6e8db42bbee4643883ab24d0e3adcb241178f12 100644 (file)
@@ -50,5 +50,4 @@ protected:
 #endif
 };
 
-
 #endif