Remove versioning functions, now provided by Hoppy (fixes #18).

parent 35d79b94
......@@ -51,7 +51,6 @@ executable qtah-generator
main-is: Main.hs
other-modules:
Graphics.UI.Qtah.Generator.Common
, Graphics.UI.Qtah.Generator.Flag
, Graphics.UI.Qtah.Generator.Flags
, Graphics.UI.Qtah.Generator.Interface.Core
, Graphics.UI.Qtah.Generator.Interface.Core.QAbstractItemModel
......
-- This file is part of Qtah.
--
-- Copyright 2015-2017 Bryan Gardiner <bog@khumba.net>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Lesser General Public License as published by
-- the Free Software Foundation, either version 3 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 Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
-- | Utilities for conditional compilation of parts of Qt interfaces.
module Graphics.UI.Qtah.Generator.Flag (
collect,
just,
test,
) where
import Data.Maybe (catMaybes)
collect :: [Maybe a] -> [a]
collect = catMaybes
just :: a -> Maybe a
just = Just
test :: Bool -> a -> Maybe a
test True = Just
test False = const Nothing
......@@ -57,7 +57,7 @@ import Foreign.Hoppy.Generator.Spec.ClassFeature (
classAddFeatures,
)
import Foreign.Hoppy.Generator.Types (boolT, charT, intT, enumT, objT, refT, ucharT, ushortT)
import Graphics.UI.Qtah.Generator.Flag (collect, just, test)
import Foreign.Hoppy.Generator.Version (collect, just, test)
import Graphics.UI.Qtah.Generator.Flags (qtVersion)
import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)
import Graphics.UI.Qtah.Generator.Interface.Imports
......
......@@ -47,7 +47,7 @@ import Foreign.Hoppy.Generator.Spec.ClassFeature (
classAddFeatures,
)
import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, intT, objT, refT, voidT)
import Graphics.UI.Qtah.Generator.Flag (collect, just, test)
import Foreign.Hoppy.Generator.Version (collect, just, test)
import Graphics.UI.Qtah.Generator.Flags (qtVersion)
import Graphics.UI.Qtah.Generator.Interface.Core.QChar (c_QChar)
import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)
......
......@@ -59,7 +59,7 @@ import Foreign.Hoppy.Generator.Spec.ClassFeature (
)
import Foreign.Hoppy.Generator.Std.String (c_string)
import Foreign.Hoppy.Generator.Types (charT, constT, intT, objT, ptrT, refT, voidT)
import Graphics.UI.Qtah.Generator.Flag (collect, just, test)
import Foreign.Hoppy.Generator.Version (collect, just, test)
import Graphics.UI.Qtah.Generator.Flags (qtVersion)
import Graphics.UI.Qtah.Generator.Interface.Core.QChar (c_QChar)
import Graphics.UI.Qtah.Generator.Interface.Imports
......
......@@ -34,7 +34,7 @@ import Foreign.Hoppy.Generator.Spec (
mkProp,
)
import Foreign.Hoppy.Generator.Types (doubleT, enumT, intT, objT, ptrT, voidT)
import Graphics.UI.Qtah.Generator.Flag (collect, just, test)
import Foreign.Hoppy.Generator.Version (collect, just, test)
import Graphics.UI.Qtah.Generator.Flags (qtVersion)
import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)
import Graphics.UI.Qtah.Generator.Interface.Gui.QValidator (c_QValidator)
......
......@@ -40,7 +40,7 @@ import Foreign.Hoppy.Generator.Spec (
mkProp,
)
import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, intT, objT, ptrT, refT, voidT)
import Graphics.UI.Qtah.Generator.Flag (collect, just, test)
import Foreign.Hoppy.Generator.Version (collect, just, test)
import Graphics.UI.Qtah.Generator.Flags (qtVersion)
import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)
import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_Alignment)
......
......@@ -35,7 +35,7 @@ import Foreign.Hoppy.Generator.Spec (
mkProp,
)
import Foreign.Hoppy.Generator.Types (boolT, enumT, objT, ptrT, voidT)
import Graphics.UI.Qtah.Generator.Flag (collect, just, test)
import Foreign.Hoppy.Generator.Version (collect, just, test)
import Graphics.UI.Qtah.Generator.Flags (qtVersion)
import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)
import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)
......
......@@ -39,7 +39,7 @@ import Foreign.Hoppy.Generator.Spec (
mkStaticProp,
)
import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, objT, ptrT, voidT)
import Graphics.UI.Qtah.Generator.Flag (collect, just, test)
import Foreign.Hoppy.Generator.Version (collect, just, test)
import Graphics.UI.Qtah.Generator.Flags (keypadNavigation, qtVersion)
import Graphics.UI.Qtah.Generator.Interface.Core.QCoreApplication (c_QCoreApplication)
import Graphics.UI.Qtah.Generator.Interface.Core.QList (c_QListQWidget)
......
......@@ -35,7 +35,7 @@ import Foreign.Hoppy.Generator.Spec (
mkStaticMethod',
)
import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, objT, ptrT, voidT)
import Graphics.UI.Qtah.Generator.Flag (collect, just, test)
import Foreign.Hoppy.Generator.Version (collect, just, test)
import Graphics.UI.Qtah.Generator.Flags (qtVersion)
import Graphics.UI.Qtah.Generator.Interface.Core.QDir (bs_Filters, c_QDir)
import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)
......
......@@ -36,7 +36,7 @@ import Foreign.Hoppy.Generator.Spec (
mkProp,
)
import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, intT, objT, ptrT, voidT)
import Graphics.UI.Qtah.Generator.Flag (collect, just, test)
import Foreign.Hoppy.Generator.Version (collect, just, test)
import Graphics.UI.Qtah.Generator.Flags (qtVersion)
import Graphics.UI.Qtah.Generator.Interface.Core.QMargins (c_QMargins)
import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)
......
......@@ -35,7 +35,7 @@ import Foreign.Hoppy.Generator.Spec (
mkProp,
)
import Foreign.Hoppy.Generator.Types (enumT, objT, ptrT, voidT)
import Graphics.UI.Qtah.Generator.Flag (collect, just, test)
import Foreign.Hoppy.Generator.Version (collect, just, test)
import Graphics.UI.Qtah.Generator.Flags (wsWince)
import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint)
import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect)
......
......@@ -41,7 +41,7 @@ import Foreign.Hoppy.Generator.Spec.ClassFeature (
classAddFeatures,
)
import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, intT, voidT)
import Graphics.UI.Qtah.Generator.Flag (collect, just, test)
import Foreign.Hoppy.Generator.Version (collect, just, test)
import Graphics.UI.Qtah.Generator.Flags (qtVersion)
import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_Orientations)
import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)
......
......@@ -32,7 +32,7 @@ import Foreign.Hoppy.Generator.Spec (
mkMethod',
)
import Foreign.Hoppy.Generator.Types (enumT, intT, objT, voidT)
import Graphics.UI.Qtah.Generator.Flag (collect, just, test)
import Foreign.Hoppy.Generator.Version (collect, just, test)
import Graphics.UI.Qtah.Generator.Flags (qtVersion)
import Graphics.UI.Qtah.Generator.Interface.Widgets.QLayoutItem (c_QLayoutItem)
import Graphics.UI.Qtah.Generator.Interface.Widgets.QSizePolicy (c_QSizePolicy, e_Policy)
......
......@@ -33,7 +33,7 @@ import Foreign.Hoppy.Generator.Spec (
mkProp,
)
import Foreign.Hoppy.Generator.Types (intT, objT, ptrT, voidT)
import Graphics.UI.Qtah.Generator.Flag (collect, just, test)
import Foreign.Hoppy.Generator.Version (collect, just, test)
import Graphics.UI.Qtah.Generator.Flags (qtVersion)
import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)
import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (
......
......@@ -36,7 +36,7 @@ import Foreign.Hoppy.Generator.Spec (
mkStaticMethod,
)
import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, intT, objT, ptrT, voidT)
import Graphics.UI.Qtah.Generator.Flag (collect, just, test)
import Foreign.Hoppy.Generator.Version (collect, just, test)
import Graphics.UI.Qtah.Generator.Flags (keypadNavigation, qdoc, qtVersion)
import Graphics.UI.Qtah.Generator.Interface.Core.QMargins (c_QMargins)
import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)
......
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