Apply a bunch of HLint clean-ups.

parent abb49322
...@@ -160,8 +160,8 @@ findQmake programDb verbosity = do ...@@ -160,8 +160,8 @@ findQmake programDb verbosity = do
generatorConfiguredProgram <- generatorConfiguredProgram <-
maybe (dieFn $ packageName ++ ": Couldn't find qtah-generator. Is it installed?") return $ maybe (dieFn $ packageName ++ ": Couldn't find qtah-generator. Is it installed?") return $
lookupProgram generatorProgram programDb lookupProgram generatorProgram programDb
output <- fmap lines $ output <-
getProgramOutput verbosity generatorConfiguredProgram ["--qmake-executable"] lines <$> getProgramOutput verbosity generatorConfiguredProgram ["--qmake-executable"]
case output of case output of
executable:args -> return (executable, args) executable:args -> return (executable, args)
[] -> fail $ packageName ++ [] -> fail $ packageName ++
...@@ -321,10 +321,12 @@ exportQtVersion configFlags localBuildInfo = do ...@@ -321,10 +321,12 @@ exportQtVersion configFlags localBuildInfo = do
#endif #endif
qt4Flag = fromMaybe False $ lookupFlag (mkFlagName "qt4") flags qt4Flag = fromMaybe False $ lookupFlag (mkFlagName "qt4") flags
qt5Flag = fromMaybe False $ lookupFlag (mkFlagName "qt5") flags qt5Flag = fromMaybe False $ lookupFlag (mkFlagName "qt5") flags
qtFlag = if qt4Flag then Just 4 else if qt5Flag then Just 5 else Nothing qtFlag | qt4Flag = Just 4
| qt5Flag = Just 5
| otherwise = Nothing
when (qt4Flag && qt5Flag) $ when (qt4Flag && qt5Flag) $
dieFn $ concat dieFn $
[packageName, ": The qt4 and qt5 flags are mutually exclusive. Please select at most one."] packageName ++ ": The qt4 and qt5 flags are mutually exclusive. Please select at most one."
-- Inspect the QTAH_QT environment variable. -- Inspect the QTAH_QT environment variable.
qtahQtStr <- lookupEnv "QTAH_QT" qtahQtStr <- lookupEnv "QTAH_QT"
...@@ -341,11 +343,10 @@ exportQtVersion configFlags localBuildInfo = do ...@@ -341,11 +343,10 @@ exportQtVersion configFlags localBuildInfo = do
-- generator to pick up. -- generator to pick up.
case (qtahQtMajor, qtFlag) of case (qtahQtMajor, qtFlag) of
-- If both QTAH_QT and one of the qtX flags above is set, then they must agree. -- If both QTAH_QT and one of the qtX flags above is set, then they must agree.
(Just m, Just n) -> do (Just m, Just n) | m /= n ->
when (m /= n) $ dieFn $ concat
dieFn $ concat [packageName, ": QTAH_QT=", show $ fromMaybe "" qtahQtStr, " and the qt",
[packageName, ": QTAH_QT=", show $ fromMaybe "" qtahQtStr, " and the qt", show n, " flag conflict."]
show n, " flag conflict."]
-- Otherwise, if QTAH_QT is not already set but we have a flag preference, -- Otherwise, if QTAH_QT is not already set but we have a flag preference,
-- then use QTAH_QT to tell qtah-generator about the flag. -- then use QTAH_QT to tell qtah-generator about the flag.
(Nothing, Just n) -> setEnv "QTAH_QT" $ show n (Nothing, Just n) -> setEnv "QTAH_QT" $ show n
...@@ -360,7 +361,7 @@ exportQtVersion configFlags localBuildInfo = do ...@@ -360,7 +361,7 @@ exportQtVersion configFlags localBuildInfo = do
(_, Just n) -> (_, Just n) ->
notice verbosity $ notice verbosity $
concat [packageName, ": Requesting Qt ", show n, " because of the qt", show n, " flag."] concat [packageName, ": Requesting Qt ", show n, " because of the qt", show n, " flag."]
_ -> notice verbosity $ concat [packageName, ": Requesting system default Qt."] _ -> notice verbosity $ packageName ++ ": Requesting system default Qt."
return $ qtahQtMajor <|> qtFlag return $ qtahQtMajor <|> qtFlag
......
...@@ -108,9 +108,9 @@ wsWince = False ...@@ -108,9 +108,9 @@ wsWince = False
-- qmake binary. -- qmake binary.
readQt :: IO QtConfig readQt :: IO QtConfig
readQt = do readQt = do
maybeStr <- fmap (\x -> case x of maybeStr <- (\x -> case x of
Just "" -> Nothing Just "" -> Nothing
_ -> x) $ _ -> x) <$>
lookupEnv "QTAH_QT" lookupEnv "QTAH_QT"
case maybeStr of case maybeStr of
Just str -> do Just str -> do
...@@ -147,7 +147,7 @@ readQt = do ...@@ -147,7 +147,7 @@ readQt = do
qmakeExecutableNamesForVersion major = ["qmake-qt" ++ show major, "qmake"] qmakeExecutableNamesForVersion major = ["qmake-qt" ++ show major, "qmake"]
queryQmake :: Maybe Int -> IO QtConfig queryQmake :: Maybe Int -> IO QtConfig
queryQmake maybePreferredMajorVersion = do queryQmake maybePreferredMajorVersion =
case maybePreferredMajorVersion of case maybePreferredMajorVersion of
Nothing -> Nothing ->
-- No major version preference, so take whatever Qt is available. -- No major version preference, so take whatever Qt is available.
......
...@@ -36,7 +36,7 @@ import Graphics.UI.Qtah.Generator.Types ...@@ -36,7 +36,7 @@ import Graphics.UI.Qtah.Generator.Types
aModule = aModule =
AQtModule $ AQtModule $
makeQtModule ["Core", "QAbstractListModel"] $ makeQtModule ["Core", "QAbstractListModel"]
[ QtExport $ ExportClass c_QAbstractListModel ] [ QtExport $ ExportClass c_QAbstractListModel ]
c_QAbstractListModel = c_QAbstractListModel =
......
...@@ -36,7 +36,7 @@ import Graphics.UI.Qtah.Generator.Types ...@@ -36,7 +36,7 @@ import Graphics.UI.Qtah.Generator.Types
aModule = aModule =
AQtModule $ AQtModule $
makeQtModule ["Core", "QAbstractTableModel"] $ makeQtModule ["Core", "QAbstractTableModel"]
[ QtExport $ ExportClass c_QAbstractTableModel ] [ QtExport $ ExportClass c_QAbstractTableModel ]
c_QAbstractTableModel = c_QAbstractTableModel =
......
...@@ -80,7 +80,7 @@ c_QItemSelection = ...@@ -80,7 +80,7 @@ c_QItemSelection =
ClassHaskellConversion ClassHaskellConversion
{ classHaskellConversionType = Just $ do { classHaskellConversionType = Just $ do
hsType <- cppTypeToHsTypeAndUse HsHsSide $ objT c_QItemSelectionRange hsType <- cppTypeToHsTypeAndUse HsHsSide $ objT c_QItemSelectionRange
return $ HsTyApp (HsTyCon $ Special $ HsListCon) hsType return $ HsTyApp (HsTyCon $ Special HsListCon) hsType
, classHaskellConversionToCppFn = Nothing , classHaskellConversionToCppFn = Nothing
, classHaskellConversionFromCppFn = Just $ do , classHaskellConversionFromCppFn = Just $ do
addImports importForRuntime addImports importForRuntime
...@@ -89,7 +89,7 @@ c_QItemSelection = ...@@ -89,7 +89,7 @@ c_QItemSelection =
addAddendumHaskell addAddendumHaskell
(inheritHasContents c_QItemSelection c_QListQItemSelectionRange $ objT c_QItemSelectionRange) $ (inheritHasContents c_QItemSelection c_QListQItemSelectionRange $ objT c_QItemSelectionRange) $
classSetEntityPrefix "" $ classSetEntityPrefix "" $
makeClass (ident "QItemSelection") Nothing [c_QListQItemSelectionRange] $ makeClass (ident "QItemSelection") Nothing [c_QListQItemSelectionRange]
[ mkCtor "new" [] [ mkCtor "new" []
, mkCtor "newWithRange" [objT c_QModelIndex, objT c_QModelIndex] , mkCtor "newWithRange" [objT c_QModelIndex, objT c_QModelIndex]
, mkConstMethod "contains" [objT c_QModelIndex] boolT , mkConstMethod "contains" [objT c_QModelIndex] boolT
......
...@@ -251,9 +251,8 @@ instantiate' listName t tReqs opts = ...@@ -251,9 +251,8 @@ instantiate' listName t tReqs opts =
-- type using HasContents/FromContents. -- type using HasContents/FromContents.
conversion = conversion =
ClassHaskellConversion ClassHaskellConversion
{ classHaskellConversionType = Just $ do { classHaskellConversionType =
hsType <- cppTypeToHsTypeAndUse HsHsSide t Just $ HsTyApp (HsTyCon $ Special HsListCon) <$> cppTypeToHsTypeAndUse HsHsSide t
return $ HsTyApp (HsTyCon $ Special HsListCon) hsType
, classHaskellConversionToCppFn = Just $ do , classHaskellConversionToCppFn = Just $ do
addImports importForRuntime addImports importForRuntime
sayLn "QtahFHR.fromContents" sayLn "QtahFHR.fromContents"
......
...@@ -57,7 +57,7 @@ c_QMetaClassInfo = ...@@ -57,7 +57,7 @@ c_QMetaClassInfo =
classSetConversionToGc $ classSetConversionToGc $
classAddFeatures [Copyable] $ classAddFeatures [Copyable] $
classSetEntityPrefix "" $ classSetEntityPrefix "" $
makeClass (ident "QMetaClassInfo") Nothing [] $ makeClass (ident "QMetaClassInfo") Nothing []
[ makeFnMethod (ident2 "qtah" "qmetaclassinfo" "name") "name" MConst Nonpure [ makeFnMethod (ident2 "qtah" "qmetaclassinfo" "name") "name" MConst Nonpure
[objT c_QMetaClassInfo] $ objT c_QString [objT c_QMetaClassInfo] $ objT c_QString
, makeFnMethod (ident2 "qtah" "qmetaclassinfo" "value") "value" MConst Nonpure , makeFnMethod (ident2 "qtah" "qmetaclassinfo" "value") "value" MConst Nonpure
......
...@@ -61,8 +61,8 @@ import Graphics.UI.Qtah.Generator.Types ...@@ -61,8 +61,8 @@ import Graphics.UI.Qtah.Generator.Types
aModule = aModule =
AQtModule $ AQtModule $
makeQtModule ["Core", "QObject"] $ makeQtModule ["Core", "QObject"] $
[ QtExport $ ExportClass c_QObject (QtExport $ ExportClass c_QObject) :
] ++ map QtExportSignal signals map QtExportSignal signals
c_QObject = c_QObject =
addReqIncludes [ includeStd "QObject" addReqIncludes [ includeStd "QObject"
......
...@@ -88,7 +88,7 @@ c_QStringList = ...@@ -88,7 +88,7 @@ c_QStringList =
{ classHaskellConversionType = Just $ do { classHaskellConversionType = Just $ do
addImports importForPrelude addImports importForPrelude
return $ return $
HsTyApp (HsTyCon $ Special $ HsListCon) $ HsTyApp (HsTyCon $ Special HsListCon) $
HsTyCon $ UnQual $ HsIdent "QtahP.String" HsTyCon $ UnQual $ HsIdent "QtahP.String"
, classHaskellConversionToCppFn = Just $ do , classHaskellConversionToCppFn = Just $ do
addImports importForRuntime addImports importForRuntime
......
...@@ -41,7 +41,7 @@ import Graphics.UI.Qtah.Generator.Types ...@@ -41,7 +41,7 @@ import Graphics.UI.Qtah.Generator.Types
aModule = aModule =
AQtModule $ AQtModule $
makeQtModule ["Core", "QStringListModel"] $ makeQtModule ["Core", "QStringListModel"]
[ QtExport $ ExportClass c_QStringListModel ] [ QtExport $ ExportClass c_QStringListModel ]
c_QStringListModel = c_QStringListModel =
......
...@@ -59,7 +59,7 @@ c_QBrush = ...@@ -59,7 +59,7 @@ c_QBrush =
classSetConversionToGc $ classSetConversionToGc $
classAddFeatures [Assignable, Copyable, Equatable] $ classAddFeatures [Assignable, Copyable, Equatable] $
classSetEntityPrefix "" $ classSetEntityPrefix "" $
makeClass (ident "QBrush") Nothing [] $ makeClass (ident "QBrush") Nothing []
[ mkCtor "new" [] [ mkCtor "new" []
, mkCtor "newWithColor" [objT c_QColor] , mkCtor "newWithColor" [objT c_QColor]
, mkProp "color" $ objT c_QColor , mkProp "color" $ objT c_QColor
......
...@@ -112,12 +112,12 @@ c_QIcon = ...@@ -112,12 +112,12 @@ c_QIcon =
, just $ mkConstMethod "isNull" [] boolT , just $ mkConstMethod "isNull" [] boolT
, just $ mkConstMethod "name" [] $ objT c_QString , just $ mkConstMethod "name" [] $ objT c_QString
, just $ mkConstMethod' "paint" "paintWithRect" , just $ mkConstMethod' "paint" "paintWithRect"
[ptrT $ objT c_QPainter, objT c_QRect] $ voidT [ptrT $ objT c_QPainter, objT c_QRect] voidT
, just $ mkConstMethod' "paint" "paintWithRectAll" , just $ mkConstMethod' "paint" "paintWithRectAll"
[ptrT $ objT c_QPainter, objT c_QRect, bitspaceT bs_Alignment, enumT e_Mode, enumT e_State] [ptrT $ objT c_QPainter, objT c_QRect, bitspaceT bs_Alignment, enumT e_Mode, enumT e_State]
voidT voidT
, just $ mkConstMethod' "paint" "paintWithRaw" , just $ mkConstMethod' "paint" "paintWithRaw"
[ptrT $ objT c_QPainter, intT, intT, intT, intT] $ voidT [ptrT $ objT c_QPainter, intT, intT, intT, intT] voidT
, just $ mkConstMethod' "paint" "paintWithRawAll" , just $ mkConstMethod' "paint" "paintWithRawAll"
[ptrT $ objT c_QPainter, intT, intT, intT, intT, bitspaceT bs_Alignment, enumT e_Mode, [ptrT $ objT c_QPainter, intT, intT, intT, intT, bitspaceT bs_Alignment, enumT e_Mode,
enumT e_State] enumT e_State]
......
...@@ -249,7 +249,7 @@ c_QImage = ...@@ -249,7 +249,7 @@ c_QImage =
] ]
e_Format = e_Format =
makeQtEnum (ident1 "QImage" "Format") [includeStd "QImage"] $ makeQtEnum (ident1 "QImage" "Format") [includeStd "QImage"]
[ (0, ["format", "invalid"]) [ (0, ["format", "invalid"])
, (1, ["format", "mono"]) , (1, ["format", "mono"])
, (2, ["format", "mono", "l", "s", "b"]) , (2, ["format", "mono", "l", "s", "b"])
...@@ -278,7 +278,7 @@ e_Format = ...@@ -278,7 +278,7 @@ e_Format =
] ]
e_InvertMode = e_InvertMode =
makeQtEnum (ident1 "QImage" "InvertMode") [includeStd "QImage"] $ makeQtEnum (ident1 "QImage" "InvertMode") [includeStd "QImage"]
[ (0, ["invert", "rgb"]) [ (0, ["invert", "rgb"])
, (1, ["invert", "rgba"]) , (1, ["invert", "rgba"])
] ]
...@@ -41,7 +41,7 @@ import Graphics.UI.Qtah.Generator.Types ...@@ -41,7 +41,7 @@ import Graphics.UI.Qtah.Generator.Types
aModule = aModule =
AQtModule $ AQtModule $
makeQtModule ["Gui", "QIntValidator"] $ makeQtModule ["Gui", "QIntValidator"]
[ QtExport $ ExportClass c_QIntValidator ] [ QtExport $ ExportClass c_QIntValidator ]
c_QIntValidator = c_QIntValidator =
......
...@@ -68,7 +68,7 @@ c_QPaintDevice = ...@@ -68,7 +68,7 @@ c_QPaintDevice =
] ]
e_PaintDeviceMetric = e_PaintDeviceMetric =
makeQtEnum (ident1 "QPaintDevice" "PaintDeviceMetric") [includeStd "QPaintDevice"] $ makeQtEnum (ident1 "QPaintDevice" "PaintDeviceMetric") [includeStd "QPaintDevice"]
[ (1, ["pdm", "width"]) [ (1, ["pdm", "width"])
, (2, ["pdm", "height"]) , (2, ["pdm", "height"])
, (3, ["pdm", "width", "mm"]) , (3, ["pdm", "width", "mm"])
......
...@@ -48,11 +48,11 @@ import Graphics.UI.Qtah.Generator.Types ...@@ -48,11 +48,11 @@ import Graphics.UI.Qtah.Generator.Types
aModule = aModule =
AQtModule $ AQtModule $
makeQtModule ["Gui", "QPainter"] $ makeQtModule ["Gui", "QPainter"]
(QtExport $ ExportClass c_QPainter) : [ QtExport $ ExportClass c_QPainter
(QtExport $ ExportEnum e_RenderHint) : , QtExport $ ExportEnum e_RenderHint
(QtExport $ ExportBitspace bs_RenderHints) : , QtExport $ ExportBitspace bs_RenderHints
[] ]
c_QPainter = c_QPainter =
addReqIncludes [includeStd "QPainter"] $ addReqIncludes [includeStd "QPainter"] $
...@@ -69,7 +69,7 @@ c_QPainter = ...@@ -69,7 +69,7 @@ c_QPainter =
] ]
(e_RenderHint, bs_RenderHints) = (e_RenderHint, bs_RenderHints) =
makeQtEnumBitspace (ident1 "QPainter" "RenderHint") "RenderHints" [includeStd "QPainter"] $ makeQtEnumBitspace (ident1 "QPainter" "RenderHint") "RenderHints" [includeStd "QPainter"]
[ (0x01, ["antialiasing"]) [ (0x01, ["antialiasing"])
, (0x02, ["text","antialiasing"]) , (0x02, ["text","antialiasing"])
, (0x04, ["smooth","pixmap","transform"]) , (0x04, ["smooth","pixmap","transform"])
......
...@@ -51,7 +51,7 @@ c_QPen = ...@@ -51,7 +51,7 @@ c_QPen =
classSetConversionToGc $ classSetConversionToGc $
classAddFeatures [Assignable, Copyable, Equatable] $ classAddFeatures [Assignable, Copyable, Equatable] $
classSetEntityPrefix "" $ classSetEntityPrefix "" $
makeClass (ident "QPen") Nothing [] $ makeClass (ident "QPen") Nothing []
[ mkCtor "new" [] [ mkCtor "new" []
, mkCtor "newWithColor" [objT c_QColor] , mkCtor "newWithColor" [objT c_QColor]
] ]
...@@ -42,7 +42,7 @@ minVersion = [5, 4] ...@@ -42,7 +42,7 @@ minVersion = [5, 4]
aModule = aModule =
AQtModule $ AQtModule $
makeQtModuleWithMinVersion ["Gui", "QRasterWindow"] minVersion $ makeQtModuleWithMinVersion ["Gui", "QRasterWindow"] minVersion
[ QtExport $ ExportClass c_QRasterWindow ] [ QtExport $ ExportClass c_QRasterWindow ]
c_QRasterWindow = c_QRasterWindow =
......
...@@ -44,7 +44,7 @@ minVersion = [5, 0] ...@@ -44,7 +44,7 @@ minVersion = [5, 0]
aModule = aModule =
AQtModule $ AQtModule $
makeQtModuleWithMinVersion ["Gui", "QSurface"] minVersion $ makeQtModuleWithMinVersion ["Gui", "QSurface"] minVersion
[ QtExport $ ExportClass c_QSurface [ QtExport $ ExportClass c_QSurface
, QtExport $ ExportEnum e_SurfaceClass , QtExport $ ExportEnum e_SurfaceClass
, QtExport $ ExportEnum e_SurfaceType , QtExport $ ExportEnum e_SurfaceType
......
...@@ -50,6 +50,6 @@ c_QTransform = ...@@ -50,6 +50,6 @@ c_QTransform =
classSetConversionToGc $ classSetConversionToGc $
classAddFeatures [Assignable, Copyable, Equatable] $ classAddFeatures [Assignable, Copyable, Equatable] $
classSetEntityPrefix "" $ classSetEntityPrefix "" $
makeClass (ident "QTransform") Nothing [] $ makeClass (ident "QTransform") Nothing []
[ mkCtor "new2x2" [qreal, qreal, qreal, qreal, qreal, qreal] [ mkCtor "new2x2" [qreal, qreal, qreal, qreal, qreal, qreal]
] ]
...@@ -50,7 +50,7 @@ aModule = ...@@ -50,7 +50,7 @@ aModule =
c_QValidator = c_QValidator =
addReqIncludes [includeStd "QValidator"] $ addReqIncludes [includeStd "QValidator"] $
classSetEntityPrefix "" $ classSetEntityPrefix "" $
makeClass (ident "QValidator") Nothing [c_QObject] $ makeClass (ident "QValidator") Nothing [c_QObject]
[ mkConstMethod "fixup" [refT $ objT c_QString] voidT [ mkConstMethod "fixup" [refT $ objT c_QString] voidT
-- TODO locale -- TODO locale
-- TODO setLocale -- TODO setLocale
......
...@@ -45,7 +45,7 @@ import Graphics.UI.Qtah.Generator.Types ...@@ -45,7 +45,7 @@ import Graphics.UI.Qtah.Generator.Types
aModule = aModule =
AQtModule $ AQtModule $
makeQtModuleWithMinVersion ["Gui", "QtahOpenGLWindow"] minVersion $ makeQtModuleWithMinVersion ["Gui", "QtahOpenGLWindow"] minVersion
[ QtExport $ ExportClass c_QtahOpenGLWindow ] [ QtExport $ ExportClass c_QtahOpenGLWindow ]
c_QtahOpenGLWindow = c_QtahOpenGLWindow =
......
...@@ -41,7 +41,7 @@ import Graphics.UI.Qtah.Generator.Types ...@@ -41,7 +41,7 @@ import Graphics.UI.Qtah.Generator.Types
aModule = aModule =
AQtModule $ AQtModule $
makeQtModuleWithMinVersion ["Gui", "QtahRasterWindow"] minVersion $ makeQtModuleWithMinVersion ["Gui", "QtahRasterWindow"] minVersion
[ QtExport $ ExportClass c_QtahRasterWindow ] [ QtExport $ ExportClass c_QtahRasterWindow ]
c_QtahRasterWindow = c_QtahRasterWindow =
......
...@@ -53,8 +53,7 @@ aModule = ...@@ -53,8 +53,7 @@ aModule =
c_QAbstractButton = c_QAbstractButton =
addReqIncludes [includeStd "QAbstractButton"] $ addReqIncludes [includeStd "QAbstractButton"] $
classSetEntityPrefix "" $ classSetEntityPrefix "" $
makeClass (ident "QAbstractButton") Nothing makeClass (ident "QAbstractButton") Nothing [c_QWidget]
[ c_QWidget ] $
-- Abstact. -- Abstact.
[ mkMethod "animateClick" [intT] voidT [ mkMethod "animateClick" [intT] voidT
, mkProp "autoExclusive" boolT , mkProp "autoExclusive" boolT
......
...@@ -43,7 +43,7 @@ aModule = ...@@ -43,7 +43,7 @@ aModule =
c_QAbstractItemDelegate = c_QAbstractItemDelegate =
addReqIncludes [includeStd "QAbstractItemDelegate"] $ addReqIncludes [includeStd "QAbstractItemDelegate"] $
classSetEntityPrefix "" $ classSetEntityPrefix "" $
makeClass (ident "QAbstractItemDelegate") Nothing [c_QObject] $ makeClass (ident "QAbstractItemDelegate") Nothing [c_QObject]
[ -- TODO Methods. [ -- TODO Methods.
] ]
......
...@@ -85,7 +85,7 @@ aModule = ...@@ -85,7 +85,7 @@ aModule =
c_QAbstractItemView = c_QAbstractItemView =
addReqIncludes [includeStd "QAbstractItemView"] $ addReqIncludes [includeStd "QAbstractItemView"] $
classSetEntityPrefix "" $ classSetEntityPrefix "" $
makeClass (ident "QAbstractItemView") Nothing [c_QAbstractScrollArea] $ makeClass (ident "QAbstractItemView") Nothing [c_QAbstractScrollArea]
[ mkProp "alternatingRowColors" boolT [ mkProp "alternatingRowColors" boolT
, mkBoolHasProp "autoScroll" , mkBoolHasProp "autoScroll"
, mkProp "autoScrollMargin" intT , mkProp "autoScrollMargin" intT
......
...@@ -56,10 +56,10 @@ aModule = ...@@ -56,10 +56,10 @@ aModule =
QtExport (ExportClass c_QAction) : QtExport (ExportClass c_QAction) :
map QtExportSignal signals ++ map QtExportSignal signals ++
(map (QtExport . ExportEnum) . collect) (map (QtExport . ExportEnum) . collect)
[ just $ e_ActionEvent [ just e_ActionEvent
, just $ e_MenuRole , just e_MenuRole
, just $ e_Priority , just e_Priority
, test (qtVersion < [5]) $ e_SoftKeyRole , test (qtVersion < [5]) e_SoftKeyRole
] ]
c_QAction = c_QAction =
......
...@@ -77,7 +77,7 @@ c_QDockWidget = ...@@ -77,7 +77,7 @@ c_QDockWidget =
, just $ mkCtor "newWithTextAndParent" [objT c_QString, ptrT $ objT c_QWidget] , just $ mkCtor "newWithTextAndParent" [objT c_QString, ptrT $ objT c_QWidget]
-- TODO Ctor with Qt::WindowFlags. -- TODO Ctor with Qt::WindowFlags.
, just $ mkProp "allowedAreas" $ bitspaceT bs_DockWidgetAreas , just $ mkProp "allowedAreas" $ bitspaceT bs_DockWidgetAreas
, just $ mkConstMethod "isAreaAllowed" [enumT e_DockWidgetArea] $ boolT , just $ mkConstMethod "isAreaAllowed" [enumT e_DockWidgetArea] boolT
, just $ mkProp "features" $ bitspaceT bs_DockWidgetFeatures , just $ mkProp "features" $ bitspaceT bs_DockWidgetFeatures
, just $ mkBoolIsProp "floating" , just $ mkBoolIsProp "floating"
, test (qtVersion >= [4, 3]) $ mkProp "titleBarWidget" $ ptrT $ objT c_QWidget , test (qtVersion >= [4, 3]) $ mkProp "titleBarWidget" $ ptrT $ objT c_QWidget
...@@ -97,7 +97,7 @@ signals = ...@@ -97,7 +97,7 @@ signals =
(e_DockWidgetFeature, bs_DockWidgetFeatures) = (e_DockWidgetFeature, bs_DockWidgetFeatures) =
makeQtEnumBitspace (ident1 "QDockWidget" "DockWidgetFeature") "DockWidgetFeatures" makeQtEnumBitspace (ident1 "QDockWidget" "DockWidgetFeature") "DockWidgetFeatures"
[includeStd "QDockWidget"] $ [includeStd "QDockWidget"]
[ (0x0, ["no", "dock", "widget", "features"]) [ (0x0, ["no", "dock", "widget", "features"])
, (0x1, ["dock", "widget", "closable"]) , (0x1, ["dock", "widget", "closable"])
, (0x2, ["dock", "widget", "movable"]) , (0x2, ["dock", "widget", "movable"])
......
...@@ -174,7 +174,7 @@ e_FileMode = ...@@ -174,7 +174,7 @@ e_FileMode =
, just (1, ["existing", "file"]) , just (1, ["existing", "file"])
, just (2, ["directory"]) , just (2, ["directory"])
, just (3, ["existing", "files"]) , just (3, ["existing", "files"])
, test (qtVersion < [4, 5]) $ (4, ["directory", "only"]) , test (qtVersion < [4, 5]) (4, ["directory", "only"])
] ]
(e_Option, bs_Options) = (e_Option, bs_Options) =
......
...@@ -377,23 +377,23 @@ e_GraphicsItemChange = ...@@ -377,23 +377,23 @@ e_GraphicsItemChange =
makeQtEnumBitspace (ident1 "QGraphicsItem" "GraphicsItemFlag") "GraphicsItemFlags" makeQtEnumBitspace (ident1 "QGraphicsItem" "GraphicsItemFlag") "GraphicsItemFlags"
[includeStd "QGraphicsItem"] $ [includeStd "QGraphicsItem"] $
collect collect
[ just $ (0x1, ["item","is","movable"]) [ just (0x1, ["item","is","movable"])
, just $ (0x2, ["item","is","selectable"]) , just (0x2, ["item","is","selectable"])
, just $ (0x4, ["item","is","focusable"]) , just (0x4, ["item","is","focusable"])
, just $ (0x8, ["item","clips","to","shape"]) , just (0x8, ["item","clips","to","shape"])
, just $ (0x10, ["item","clips","children","to","shape"]) , just (0x10, ["item","clips","children","to","shape"])
, just $ (0x20, ["item","ignores","transformations"]) , just (0x20, ["item","ignores","transformations"])
, just $ (0x40, ["item","ignores","parent","opacity"]) , just (0x40, ["item","ignores","parent","opacity"])
, just $ (0x80, ["item","doesnt","propagate","opacity","to","children"]) , just (0x80, ["item","doesnt","propagate","opacity","to","children"])
, just $ (0x100, ["item","stacks","behind","parent"]) , just (0x100, ["item","stacks","behind","parent"])
, just $ (0x200, ["item","uses","extended","style","option"]) , just (0x200, ["item","uses","extended","style","option"])
, just $ (0x400, ["item","has","no","contents"]) , just (0x400, ["item","has","no","contents"])
, just $ (0x800, ["item","sends","geometry","changes"]) , just (0x800, ["item","sends","geometry","changes"])
, just $ (0x1000, ["item","accepts","input","method"]) , just (0x1000, ["item","accepts","input","method"])
, just $ (0x2000, ["item","negative","z","stacks","behind","parent"]) , just (0x2000, ["item","negative","z","stacks","behind","parent"])
, just $ (0x4000, ["item","is","panel"]) , just (0x4000, ["item","is","panel"])
, just $ (0x10000, ["item","sends","scene","position","changes"]) , just (0x10000, ["item","sends","scene","position","changes"])
, test (qtVersion >= [5, 4]) $ (0x80000, ["item","contains","children","in","shape"]) , test (qtVersion >= [5, 4]) (0x80000, ["item","contains","children","in","shape"])
] ]
e_PanelModality = e_PanelModality =
......
...@@ -45,6 +45,6 @@ aModule = ...@@ -45,6 +45,6 @@ aModule =
c_QGraphicsSceneEvent = c_QGraphicsSceneEvent =
addReqIncludes [includeStd "QGraphicsSceneEvent"] $ addReqIncludes [includeStd "QGraphicsSceneEvent"] $
classSetEntityPrefix "" $ classSetEntityPrefix "" $
makeClass (ident "QGraphicsSceneEvent") Nothing [c_QEvent] $ makeClass (ident "QGraphicsSceneEvent") Nothing [c_QEvent]
[ mkConstMethod "widget" [] $ ptrT $ objT c_QWidget [ mkConstMethod "widget" [] $ ptrT $ objT c_QWidget
] ]
...@@ -45,8 +45,8 @@ import Graphics.UI.Qtah.Generator.Types ...@@ -45,8 +45,8 @@ import Graphics.UI.Qtah.Generator.Types
aModule = aModule =
AQtModule $ AQtModule $
makeQtModule ["Widgets", "QSplitter"] $ makeQtModule ["Widgets", "QSplitter"] $
[ QtExport $ ExportClass c_QSplitter (QtExport $ ExportClass c_QSplitter) :
] ++ map QtExportSignal signals map QtExportSignal signals
c_QSplitter = c_QSplitter =
addReqIncludes [includeStd "QSplitter"] $ addReqIncludes [includeStd "QSplitter"] $
......
...@@ -48,7 +48,7 @@ aModule = ...@@ -48,7 +48,7 @@ aModule =
c_QStyledItemDelegate = c_QStyledItemDelegate =
addReqIncludes [includeStd "QStyledItemDelegate"] $ addReqIncludes [includeStd "QStyledItemDelegate"] $
classSetEntityPrefix "" $ classSetEntityPrefix "" $
makeClass (ident "QStyledItemDelegate") Nothing [c_QAbstractItemDelegate] $ makeClass (ident "QStyledItemDelegate") Nothing [c_QAbstractItemDelegate]
[