Merge lp:~3v1n0/ubuntu-ui-toolkit/slotslayout-paddings-changes-updates-size into lp:ubuntu-ui-toolkit

Proposed by Marco Trevisan (Treviño)
Status: Superseded
Proposed branch: lp:~3v1n0/ubuntu-ui-toolkit/slotslayout-paddings-changes-updates-size
Merge into: lp:ubuntu-ui-toolkit
Diff against target: 13938 lines (+3766/-2584)
405 files modified
.qmake.conf (+12/-12)
CODING (+63/-0)
debian/control (+2/-2)
debian/copyright (+5/-4)
debian/rules (+2/-2)
documentation/docs.sh (+9/-1)
documentation/documentation.pro (+1/-1)
documentation/statesaving.qdoc (+1/-1)
documentation/ubuntu-theming.qdoc (+1/-1)
documentation/ubuntu-ui-toolkit-common.qdocconf (+23/-23)
examples/ubuntu-ui-toolkit-gallery/ProgressBars.qml (+13/-4)
features/ubuntu_common.prf (+53/-0)
features/ubuntu_enable_testing.prf (+1/-1)
features/ubuntu_qml_plugin.prf (+6/-16)
features/ubuntu_qt_module.prf (+18/-18)
snapcraft.yaml (+42/-0)
src/UbuntuGestures/UbuntuGestures.pro (+30/-39)
src/UbuntuGestures/candidateinactivitytimer.cpp (+1/-1)
src/UbuntuGestures/candidateinactivitytimer_p.h (+7/-7)
src/UbuntuGestures/damper.cpp (+2/-1)
src/UbuntuGestures/damper_p.h (+3/-3)
src/UbuntuGestures/debughelpers.cpp (+4/-3)
src/UbuntuGestures/debughelpers_p.h (+5/-7)
src/UbuntuGestures/pool_p.h (+7/-7)
src/UbuntuGestures/timer.cpp (+1/-1)
src/UbuntuGestures/timer_p.h (+9/-9)
src/UbuntuGestures/timesource.cpp (+2/-2)
src/UbuntuGestures/timesource_p.h (+7/-6)
src/UbuntuGestures/touchownershipevent.cpp (+1/-1)
src/UbuntuGestures/touchownershipevent_p.h (+7/-6)
src/UbuntuGestures/touchregistry.cpp (+11/-12)
src/UbuntuGestures/touchregistry_p.h (+9/-11)
src/UbuntuGestures/ubuntugesturesglobal.h (+6/-1)
src/UbuntuGestures/ubuntugesturesmodule.cpp (+3/-2)
src/UbuntuGestures/ubuntugesturesmodule.h (+1/-1)
src/UbuntuGestures/ucswipearea.cpp (+9/-12)
src/UbuntuGestures/ucswipearea_p.h (+5/-9)
src/UbuntuGestures/ucswipearea_p_p.h (+7/-7)
src/UbuntuGestures/unownedtouchevent.cpp (+1/-1)
src/UbuntuGestures/unownedtouchevent_p.h (+8/-7)
src/UbuntuMetrics/UbuntuMetrics.pro (+21/-23)
src/UbuntuMetrics/applicationmonitor.cpp (+3/-2)
src/UbuntuMetrics/applicationmonitor.h (+5/-4)
src/UbuntuMetrics/applicationmonitor_p.h (+6/-4)
src/UbuntuMetrics/bitmaptext.cpp (+5/-3)
src/UbuntuMetrics/bitmaptext_p.h (+2/-1)
src/UbuntuMetrics/events.cpp (+9/-6)
src/UbuntuMetrics/events.h (+1/-1)
src/UbuntuMetrics/events_p.h (+6/-3)
src/UbuntuMetrics/gputimer.cpp (+3/-1)
src/UbuntuMetrics/gputimer_p.h (+3/-1)
src/UbuntuMetrics/logger.cpp (+13/-6)
src/UbuntuMetrics/logger.h (+9/-4)
src/UbuntuMetrics/logger_p.h (+5/-3)
src/UbuntuMetrics/overlay.cpp (+7/-4)
src/UbuntuMetrics/overlay_p.h (+4/-3)
src/UbuntuMetrics/ubuntumetricsglobal.cpp (+34/-0)
src/UbuntuMetrics/ubuntumetricsglobal.h (+1/-1)
src/UbuntuMetrics/ubuntumetricsglobal_p.h (+5/-1)
src/UbuntuToolkit/UbuntuToolkit.pro (+214/-238)
src/UbuntuToolkit/actionlist.cpp (+1/-0)
src/UbuntuToolkit/actionlist_p.h (+6/-5)
src/UbuntuToolkit/adapters/actionsproxy_p.cpp (+5/-4)
src/UbuntuToolkit/adapters/actionsproxy_p.h (+2/-1)
src/UbuntuToolkit/adapters/alarmsadapter_organizer.cpp (+48/-44)
src/UbuntuToolkit/adapters/alarmsadapter_p.h (+7/-6)
src/UbuntuToolkit/adapters/dbuspropertywatcher_p.cpp (+22/-16)
src/UbuntuToolkit/adapters/dbuspropertywatcher_p.h (+1/-1)
src/UbuntuToolkit/alarmmanager_p.cpp (+1/-0)
src/UbuntuToolkit/alarmmanager_p.h (+5/-5)
src/UbuntuToolkit/alarmmanager_p_p.h (+8/-6)
src/UbuntuToolkit/asyncloader_p.h (+5/-4)
src/UbuntuToolkit/asyncloader_p_p.h (+7/-6)
src/UbuntuToolkit/colorutils.cpp (+2/-1)
src/UbuntuToolkit/colorutils_p.h (+8/-6)
src/UbuntuToolkit/exclusivegroup.cpp (+3/-3)
src/UbuntuToolkit/exclusivegroup_p.h (+9/-10)
src/UbuntuToolkit/filterbehavior_p.h (+7/-6)
src/UbuntuToolkit/i18n.cpp (+60/-40)
src/UbuntuToolkit/i18n_p.h (+5/-4)
src/UbuntuToolkit/inversemouseareatype.cpp (+2/-0)
src/UbuntuToolkit/inversemouseareatype_p.h (+8/-6)
src/UbuntuToolkit/label_p.h (+3/-3)
src/UbuntuToolkit/listener.cpp (+1/-1)
src/UbuntuToolkit/listener_p.h (+5/-4)
src/UbuntuToolkit/livetimer_p.cpp (+10/-9)
src/UbuntuToolkit/livetimer_p.h (+8/-7)
src/UbuntuToolkit/livetimer_p_p.h (+7/-7)
src/UbuntuToolkit/menu.cpp (+11/-14)
src/UbuntuToolkit/menu_p.h (+5/-6)
src/UbuntuToolkit/menu_p_p.h (+3/-3)
src/UbuntuToolkit/menubar.cpp (+4/-7)
src/UbuntuToolkit/menubar_p.h (+3/-4)
src/UbuntuToolkit/menubar_p_p.h (+3/-3)
src/UbuntuToolkit/menugroup.cpp (+1/-0)
src/UbuntuToolkit/menugroup_p.h (+4/-4)
src/UbuntuToolkit/mousetouchadaptor.cpp (+5/-6)
src/UbuntuToolkit/mousetouchadaptor_p.h (+5/-5)
src/UbuntuToolkit/mousetouchadaptor_p_p.h (+9/-8)
src/UbuntuToolkit/mousetouchadaptor_x11.cpp (+4/-5)
src/UbuntuToolkit/privates/appheaderbase.cpp (+2/-1)
src/UbuntuToolkit/privates/appheaderbase_p.h (+4/-4)
src/UbuntuToolkit/privates/frame.cpp (+4/-2)
src/UbuntuToolkit/privates/frame_p.h (+5/-4)
src/UbuntuToolkit/privates/listitemdragarea.cpp (+7/-5)
src/UbuntuToolkit/privates/listitemdragarea_p.h (+6/-5)
src/UbuntuToolkit/privates/listitemdraghandler.cpp (+6/-5)
src/UbuntuToolkit/privates/listitemdraghandler_p.h (+5/-4)
src/UbuntuToolkit/privates/listitemselection.cpp (+2/-1)
src/UbuntuToolkit/privates/listitemselection_p.h (+5/-4)
src/UbuntuToolkit/privates/listviewextensions.cpp (+27/-26)
src/UbuntuToolkit/privates/listviewextensions_p.h (+9/-4)
src/UbuntuToolkit/privates/splitviewhandler.cpp (+8/-6)
src/UbuntuToolkit/privates/splitviewhandler_p.h (+6/-5)
src/UbuntuToolkit/privates/threelabelsslot_p.cpp (+2/-1)
src/UbuntuToolkit/privates/threelabelsslot_p.h (+7/-7)
src/UbuntuToolkit/privates/ucpagewrapper.cpp (+6/-5)
src/UbuntuToolkit/privates/ucpagewrapper_p.h (+4/-4)
src/UbuntuToolkit/privates/ucpagewrapper_p_p.h (+8/-7)
src/UbuntuToolkit/privates/ucpagewrapperincubator.cpp (+4/-3)
src/UbuntuToolkit/privates/ucpagewrapperincubator_p.h (+10/-9)
src/UbuntuToolkit/privates/ucscrollbarutils.cpp (+2/-1)
src/UbuntuToolkit/privates/ucscrollbarutils_p.h (+7/-6)
src/UbuntuToolkit/propertychange_p.h (+5/-5)
src/UbuntuToolkit/qquickclipboard.cpp (+2/-1)
src/UbuntuToolkit/qquickclipboard_p.h (+5/-4)
src/UbuntuToolkit/qquickclipboard_p_p.h (+7/-6)
src/UbuntuToolkit/qquickmimedata.cpp (+10/-7)
src/UbuntuToolkit/qquickmimedata_p.h (+6/-5)
src/UbuntuToolkit/quickutils.cpp (+17/-17)
src/UbuntuToolkit/quickutils_p.h (+3/-2)
src/UbuntuToolkit/sortbehavior_p.h (+7/-6)
src/UbuntuToolkit/sortfiltermodel.cpp (+3/-2)
src/UbuntuToolkit/sortfiltermodel_p.h (+8/-7)
src/UbuntuToolkit/splitview.cpp (+5/-6)
src/UbuntuToolkit/splitview_p.h (+1/-1)
src/UbuntuToolkit/splitview_p_p.h (+2/-1)
src/UbuntuToolkit/splitviewlayout.cpp (+3/-3)
src/UbuntuToolkit/statesaverbackend_p.cpp (+17/-14)
src/UbuntuToolkit/statesaverbackend_p.h (+4/-3)
src/UbuntuToolkit/timeutils_p.h (+7/-7)
src/UbuntuToolkit/tree.cpp (+2/-2)
src/UbuntuToolkit/tree_p.h (+8/-7)
src/UbuntuToolkit/ubuntutoolkitglobal.h (+2/-2)
src/UbuntuToolkit/ubuntutoolkitmodule.cpp (+124/-114)
src/UbuntuToolkit/ubuntutoolkitmodule.h (+4/-3)
src/UbuntuToolkit/ucabstractbutton.cpp (+6/-4)
src/UbuntuToolkit/ucabstractbutton_p.h (+6/-5)
src/UbuntuToolkit/ucabstractbutton_p_p.h (+7/-6)
src/UbuntuToolkit/ucaction.cpp (+24/-13)
src/UbuntuToolkit/ucaction_p.h (+7/-6)
src/UbuntuToolkit/ucactioncontext.cpp (+4/-2)
src/UbuntuToolkit/ucactioncontext_p.h (+7/-6)
src/UbuntuToolkit/ucactionitem.cpp (+6/-3)
src/UbuntuToolkit/ucactionitem_p.h (+6/-5)
src/UbuntuToolkit/ucactionitem_p_p.h (+7/-6)
src/UbuntuToolkit/ucactionmanager.cpp (+2/-1)
src/UbuntuToolkit/ucactionmanager_p.h (+5/-4)
src/UbuntuToolkit/ucalarm.cpp (+3/-1)
src/UbuntuToolkit/ucalarm_p.h (+6/-5)
src/UbuntuToolkit/ucalarm_p_p.h (+7/-5)
src/UbuntuToolkit/ucalarmmodel.cpp (+6/-4)
src/UbuntuToolkit/ucalarmmodel_p.h (+5/-4)
src/UbuntuToolkit/ucapplication.cpp (+3/-3)
src/UbuntuToolkit/ucapplication_p.h (+5/-4)
src/UbuntuToolkit/ucargument.cpp (+1/-1)
src/UbuntuToolkit/ucargument_p.h (+5/-4)
src/UbuntuToolkit/ucarguments.cpp (+15/-12)
src/UbuntuToolkit/ucarguments_p.h (+7/-6)
src/UbuntuToolkit/ucbottomedge.cpp (+16/-15)
src/UbuntuToolkit/ucbottomedge_p.h (+6/-5)
src/UbuntuToolkit/ucbottomedge_p_p.h (+8/-7)
src/UbuntuToolkit/ucbottomedgehint.cpp (+15/-10)
src/UbuntuToolkit/ucbottomedgehint_p.h (+7/-6)
src/UbuntuToolkit/ucbottomedgehint_p_p.h (+7/-7)
src/UbuntuToolkit/ucbottomedgeregion.cpp (+4/-3)
src/UbuntuToolkit/ucbottomedgeregion_p.h (+7/-6)
src/UbuntuToolkit/ucbottomedgeregion_p_p.h (+8/-6)
src/UbuntuToolkit/ucbottomedgestyle.cpp (+1/-0)
src/UbuntuToolkit/ucbottomedgestyle_p.h (+5/-4)
src/UbuntuToolkit/ucdefaulttheme.cpp (+16/-16)
src/UbuntuToolkit/ucdefaulttheme_p.h (+6/-5)
src/UbuntuToolkit/ucdeprecatedtheme.cpp (+11/-8)
src/UbuntuToolkit/ucdeprecatedtheme_p.h (+6/-5)
src/UbuntuToolkit/ucfontutils.cpp (+1/-1)
src/UbuntuToolkit/ucfontutils_p.h (+5/-5)
src/UbuntuToolkit/uchaptics.cpp (+6/-3)
src/UbuntuToolkit/uchaptics_p.h (+4/-3)
src/UbuntuToolkit/ucheader.cpp (+5/-3)
src/UbuntuToolkit/ucheader_p.h (+5/-4)
src/UbuntuToolkit/ucimportversionchecker_p.cpp (+3/-3)
src/UbuntuToolkit/ucimportversionchecker_p.h (+3/-2)
src/UbuntuToolkit/ucinversemouse_p.h (+8/-8)
src/UbuntuToolkit/uclabel.cpp (+10/-7)
src/UbuntuToolkit/uclabel_p.h (+8/-7)
src/UbuntuToolkit/uclistitem.cpp (+25/-23)
src/UbuntuToolkit/uclistitem_p.h (+6/-4)
src/UbuntuToolkit/uclistitem_p_p.h (+9/-7)
src/UbuntuToolkit/uclistitemactions.cpp (+6/-4)
src/UbuntuToolkit/uclistitemactions_p.h (+5/-4)
src/UbuntuToolkit/uclistitemactions_p_p.h (+7/-6)
src/UbuntuToolkit/uclistitemlayout.cpp (+3/-2)
src/UbuntuToolkit/uclistitemlayout_p.h (+5/-5)
src/UbuntuToolkit/uclistitemstyle.cpp (+9/-6)
src/UbuntuToolkit/uclistitemstyle_p.h (+6/-4)
src/UbuntuToolkit/ucmainviewbase.cpp (+15/-15)
src/UbuntuToolkit/ucmainviewbase_p.h (+4/-4)
src/UbuntuToolkit/ucmainviewbase_p_p.h (+9/-7)
src/UbuntuToolkit/ucmargins_p.h (+5/-4)
src/UbuntuToolkit/ucmathutils.cpp (+2/-2)
src/UbuntuToolkit/ucmathutils_p.h (+7/-7)
src/UbuntuToolkit/ucmouse_p.h (+8/-8)
src/UbuntuToolkit/ucmousefilters.cpp (+8/-8)
src/UbuntuToolkit/ucpagetreenode.cpp (+13/-13)
src/UbuntuToolkit/ucpagetreenode_p.h (+6/-5)
src/UbuntuToolkit/ucpagetreenode_p_p.h (+8/-6)
src/UbuntuToolkit/ucperformancemonitor.cpp (+1/-0)
src/UbuntuToolkit/ucperformancemonitor_p.h (+7/-6)
src/UbuntuToolkit/ucproportionalshape_p.h (+4/-4)
src/UbuntuToolkit/ucqquickimageextension.cpp (+15/-13)
src/UbuntuToolkit/ucqquickimageextension_p.h (+9/-8)
src/UbuntuToolkit/ucscalingimageprovider.cpp (+2/-2)
src/UbuntuToolkit/ucscalingimageprovider_p.h (+6/-5)
src/UbuntuToolkit/ucserviceproperties.cpp (+8/-6)
src/UbuntuToolkit/ucserviceproperties_p.h (+5/-4)
src/UbuntuToolkit/ucserviceproperties_p_p.h (+6/-5)
src/UbuntuToolkit/ucslotslayout.cpp (+4/-3)
src/UbuntuToolkit/ucslotslayout_p.h (+5/-4)
src/UbuntuToolkit/ucslotslayout_p_p.h (+7/-7)
src/UbuntuToolkit/ucstatesaver.cpp (+13/-10)
src/UbuntuToolkit/ucstatesaver_p.h (+6/-5)
src/UbuntuToolkit/ucstatesaver_p_p.h (+7/-7)
src/UbuntuToolkit/ucstyleditembase.cpp (+8/-6)
src/UbuntuToolkit/ucstyleditembase_p.h (+6/-5)
src/UbuntuToolkit/ucstyleditembase_p_p.h (+8/-6)
src/UbuntuToolkit/ucstylehints.cpp (+9/-6)
src/UbuntuToolkit/ucstylehints_p.h (+7/-6)
src/UbuntuToolkit/uctheme.cpp (+65/-43)
src/UbuntuToolkit/uctheme_p.h (+16/-7)
src/UbuntuToolkit/ucthemingextension.cpp (+8/-5)
src/UbuntuToolkit/ucthemingextension_p.h (+7/-7)
src/UbuntuToolkit/ucubuntuanimation.cpp (+1/-1)
src/UbuntuToolkit/ucubuntuanimation_p.h (+6/-6)
src/UbuntuToolkit/ucubuntushape.cpp (+11/-7)
src/UbuntuToolkit/ucubuntushape_p.h (+13/-10)
src/UbuntuToolkit/ucubuntushapeoverlay_p.h (+3/-3)
src/UbuntuToolkit/ucunits.cpp (+7/-8)
src/UbuntuToolkit/ucunits_p.h (+6/-5)
src/UbuntuToolkit/ucurihandler.cpp (+5/-2)
src/UbuntuToolkit/ucurihandler_p.h (+6/-4)
src/UbuntuToolkit/ucviewitemsattached.cpp (+13/-12)
src/UbuntuToolkit/unitythemeiconprovider.cpp (+17/-13)
src/UbuntuToolkit/unitythemeiconprovider_p.h (+7/-6)
src/UbuntuToolkit/unixsignalhandler_p.cpp (+3/-2)
src/UbuntuToolkit/unixsignalhandler_p.h (+6/-4)
src/imports/Components/1.3/AdaptivePageLayout.qml (+39/-35)
src/imports/Components/1.3/Button.qml (+1/-0)
src/imports/Components/1.3/CheckBox.qml (+1/-0)
src/imports/Components/1.3/ComboButton.qml (+2/-5)
src/imports/Components/1.3/OptionSelector.qml (+60/-1)
src/imports/Components/1.3/OptionSelectorDelegate.qml (+3/-5)
src/imports/Components/1.3/ProgressBar.qml (+4/-2)
src/imports/Components/1.3/Slider.qml (+1/-0)
src/imports/Components/1.3/TextArea.qml (+1/-0)
src/imports/Components/1.3/TextField.qml (+2/-1)
src/imports/Components/1.3/UbuntuListView.qml (+5/-1)
src/imports/Components/Labs/plugin/plugin.pri (+0/-2)
src/imports/Components/ListItems/1.2/ExpandablesColumn.qml (+3/-3)
src/imports/Components/ListItems/1.3/Base.qml (+0/-4)
src/imports/Components/Pickers/1.3/Picker.qml (+1/-1)
src/imports/Components/Pickers/1.3/PickerPanel.qml (+4/-2)
src/imports/Components/Popups/1.3/popupUtils.js (+6/-1)
src/imports/Components/Styles/plugin/plugin.pri (+0/-2)
src/imports/Components/Themes/Ambiance/1.3/ActionBarStyle.qml (+1/-0)
src/imports/Components/Themes/Ambiance/1.3/FocusShape.qml (+0/-7)
src/imports/Components/Themes/Ambiance/1.3/OptionSelectorStyle.qml (+3/-0)
src/imports/Components/Themes/Ambiance/1.3/OverflowPanel.qml (+0/-1)
src/imports/Components/Themes/Ambiance/1.3/PageHeadStyle.qml (+1/-0)
src/imports/Components/Themes/Ambiance/1.3/PageHeaderStyle.qml (+1/-0)
src/imports/Components/Themes/Ambiance/1.3/ProgressBarStyle.qml (+78/-58)
src/imports/Components/Themes/Ambiance/1.3/ScrollbarStyle.qml (+49/-28)
src/imports/Components/Themes/Ambiance/1.3/ScrollingActionBarStyle.qml (+1/-7)
src/imports/Components/Themes/Ambiance/1.3/ToolbarStyle.qml (+1/-0)
src/imports/Components/plugin/plugin.cpp (+5/-4)
src/imports/Components/plugin/plugin.h (+4/-4)
src/imports/Components/plugin/plugin.pri (+3/-8)
src/imports/Components/plugin/ucnamespace.h (+1/-2)
src/imports/Layouts/plugin/plugin.pri (+2/-11)
src/imports/Layouts/plugin/propertychanges.cpp (+5/-4)
src/imports/Layouts/plugin/propertychanges_p.h (+3/-4)
src/imports/Layouts/plugin/ulconditionallayout.cpp (+3/-4)
src/imports/Layouts/plugin/ulconditionallayout.h (+1/-1)
src/imports/Layouts/plugin/ullayouts.cpp (+4/-3)
src/imports/Layouts/plugin/ullayouts.h (+1/-0)
src/imports/Layouts/plugin/ullayouts_p.h (+2/-0)
src/imports/Layouts/plugin/ullayoutsattached.cpp (+2/-2)
src/imports/Layouts/plugin/ulplugin.cpp (+3/-2)
src/imports/Layouts/plugin/ulplugin.h (+4/-5)
src/imports/PerformanceMetrics/plugin/plugin.pri (+0/-3)
src/imports/PerformanceMetrics/plugin/rendertimer.cpp (+2/-1)
src/imports/PerformanceMetrics/plugin/upmcpuusage.cpp (+1/-0)
src/imports/PerformanceMetrics/plugin/upmcpuusage.h (+4/-2)
src/imports/PerformanceMetrics/plugin/upmgraphmodel.cpp (+2/-1)
src/imports/PerformanceMetrics/plugin/upmplugin.cpp (+5/-4)
src/imports/PerformanceMetrics/plugin/upmplugin.h (+4/-5)
src/imports/PerformanceMetrics/plugin/upmrenderingtimes.cpp (+2/-1)
src/imports/PerformanceMetrics/plugin/upmrenderingtimes.h (+5/-4)
src/imports/PerformanceMetrics/plugin/upmtexturefromimage.cpp (+2/-1)
src/imports/Test/Test.pro (+1/-0)
src/imports/Test/plugin/plugin.pri (+2/-5)
src/imports/Test/plugin/testplugin.cpp (+4/-2)
src/imports/Test/plugin/testplugin.h (+1/-1)
src/imports/Test/plugin/uctestcase.cpp (+2/-2)
src/imports/Test/plugin/uctestcase.h (+4/-4)
src/imports/Test/plugin/uctestextras.cpp (+7/-8)
src/imports/Test/plugin/uctestextras.h (+3/-3)
src/src.pro (+21/-21)
sync.profile (+3/-3)
tests/api/Extinct/Animals/plugin/pangaea.h (+3/-3)
tests/api/Extinct/Animals/plugin/plugin.cpp (+6/-5)
tests/api/Extinct/Animals/plugin/plugin.h (+3/-3)
tests/api/Extinct/Animals/plugin/plugin.pri (+1/-4)
tests/api/Extinct/Animals/plugin/rune.cpp (+2/-3)
tests/api/Extinct/Animals/plugin/rune.h (+5/-5)
tests/api/Extinct/Animals/plugin/smilodon.h (+3/-3)
tests/api/Extinct/Animals/plugin/tarpan.h (+3/-3)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_flickable.py (+1/-1)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/MyDialog.qml (+36/-0)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_popups.WindowTestCase.qml (+36/-0)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_popups.py (+19/-0)
tests/unit/alarms/tst_alarms.cpp (+10/-11)
tests/unit/animator/tst_animator.cpp (+7/-8)
tests/unit/animator/tst_animator.qml (+1/-1)
tests/unit/argument/tst_argument.cpp (+2/-3)
tests/unit/arguments/tst_arguments.cpp (+7/-8)
tests/unit/asyncloader/tst_asyncloader.cpp (+5/-4)
tests/unit/bottomedge/tst_bottomedge.cpp (+10/-10)
tests/unit/components/FIXME-QT56_pagestack_deprecated_toolbar.qml (+2/-0)
tests/unit/components/tst_action.qml (+26/-0)
tests/unit/components/tst_components.cpp (+3/-2)
tests/unit/components_benchmark/tst_components_benchmark.cpp (+5/-5)
tests/unit/custom_qpa/main.cpp (+1/-1)
tests/unit/custom_qpa/qcustombackingstore.cpp (+5/-5)
tests/unit/custom_qpa/qcustombackingstore.h (+2/-2)
tests/unit/custom_qpa/qcustomintegration.cpp (+6/-6)
tests/unit/custom_qpa/qcustomintegration.h (+2/-2)
tests/unit/deprecated_theme_engine/tst_deprecated_theme_engine.cpp (+4/-4)
tests/unit/i18n/LocalizedApp/src/tst_i18n_LocalizedApp.cpp (+15/-17)
tests/unit/i18n/RelativeTime/src/tst_i18n_RelativeTime.cpp (+15/-18)
tests/unit/iconprovider/tst_iconprovider.cpp (+0/-1)
tests/unit/inversemousearea/tst_inversemouseareatest.cpp (+7/-8)
tests/unit/layout_dependency.pri (+1/-1)
tests/unit/layouts/tst_layouts.cpp (+10/-13)
tests/unit/mainview/tst_mainview.cpp (+14/-14)
tests/unit/mousefilters/tst_mousefilterstest.cpp (+9/-11)
tests/unit/orientation/tst_orientation.cpp (+8/-9)
tests/unit/page/tst_page.cpp (+4/-4)
tests/unit/performance/tst_performance.cpp (+3/-4)
tests/unit/plugin_dependency.pri (+2/-1)
tests/unit/qmltemplate/tst_qmltemplate.cpp (+3/-2)
tests/unit/qquick_image_extension/tst_qquick_image_extension.cpp (+3/-5)
tests/unit/quickutils/tst_quickutils.cpp (+3/-3)
tests/unit/recreateview/tst_recreateview.cpp (+2/-3)
tests/unit/serviceproperties/tst_serviceproperties.cpp (+5/-5)
tests/unit/statesaver/tst_statesaver.cpp (+16/-16)
tests/unit/subtheming/tst_subtheming.cpp (+9/-9)
tests/unit/swipearea/GestureTest.cpp (+8/-9)
tests/unit/swipearea/GestureTest.h (+7/-9)
tests/unit/swipearea/tst_swipearea.cpp (+7/-9)
tests/unit/test-include.pri (+1/-3)
tests/unit/test/tst_test.cpp (+3/-2)
tests/unit/testparser/main.cpp (+7/-8)
tests/unit/theme/tst_theme.cpp (+3/-2)
tests/unit/touchregistry/touchregistry.pro (+1/-1)
tests/unit/touchregistry/tst_TouchRegistry.cpp (+4/-4)
tests/unit/tree/tst_tree.cpp (+2/-3)
tests/unit/ubuntu_shape/tst_ubuntu_shape.cpp (+2/-2)
tests/unit/units/scale/tst_units_scale.cpp (+1/-2)
tests/unit/units/units.pro (+2/-2)
tests/unit/visual/FIXME-QT56_listitem.12.qml (+1/-0)
tests/unit/visual/FIXME-QT56_listitem.13.qml (+1/-0)
tests/unit/visual/FIXME-QT56_listitem_focus.13.qml (+1/-0)
tests/unit/visual/FIXME-QT56_pagehead_sections_bug1511839.13.qml (+2/-0)
tests/unit/visual/FIXME-QT56_sections.13.qml (+1/-0)
tests/unit/visual/FIXME-QT56_textarea.11.qml (+1/-0)
tests/unit/visual/FIXME-QT56_textfield.11.qml (+1/-0)
tests/unit/visual/ScrollbarTestCase13.qml (+3/-0)
tests/unit/visual/tabsmodel.cpp (+0/-1)
tests/unit/visual/tabsmodel.h (+2/-3)
tests/unit/visual/tst_actionbar.13.qml (+1/-1)
tests/unit/visual/tst_adaptivepagelayout_configuration.13.qml (+4/-4)
tests/unit/visual/tst_expandables.11.qml (+2/-0)
tests/unit/visual/tst_expandablescolumn.11.qml (+5/-5)
tests/unit/visual/tst_focus.13.qml (+33/-3)
tests/unit/visual/tst_listitem_focus_bug.13.qml (+81/-0)
tests/unit/visual/tst_listitem_horizontal_navigation.13.qml (+66/-0)
tests/unit/visual/tst_optionselector.13.qml (+190/-0)
tests/unit/visual/tst_scrollbar.13.qml (+242/-129)
tests/unit/visual/tst_scrollbar_header.13.qml (+2/-1)
tests/unit/visual/tst_shortcuts.13.qml (+3/-3)
tests/unit/visual/tst_slotslayout.13.qml (+26/-0)
tests/unit/visual/tst_ubuntulistview.10.qml (+6/-5)
tests/unit/visual/tst_visual.cpp (+3/-3)
ubuntu-sdk.pro (+1/-0)
ubuntu-ui-toolkit-launcher/launcher.cpp (+4/-2)
To merge this branch: bzr merge lp:~3v1n0/ubuntu-ui-toolkit/slotslayout-paddings-changes-updates-size
Reviewer Review Type Date Requested Status
Ubuntu SDK team Pending
Review via email: mp+306906@code.launchpad.net

This proposal has been superseded by a proposal from 2016-09-27.

Commit message

UCSlotsLayout: update the size of the element when top/bottom paddings change

Description of the change

* Are there any related MPs required for this MP to build/function as expected? Please list.

No

* Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)

Yep

* Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?

Yes, tested with testcase too:
  https://launchpadlibrarian.net/286902679/listitem-height-size-changes.qml

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/ui-toolkit) on device or emulator?

Yes

If you changed the UI, was the change specified/approved by design?

N/A

If you changed the packaging (debian), did you subscribe a core-dev to this MP?

N/A

To post a comment you must log in.
2132. By Marco Trevisan (Treviño)

testSlotsLayout: use expectedImplicitHeight to check item height

2133. By Marco Trevisan (Treviño)

UCSlotsLayout: add some comments

2134. By Marco Trevisan (Treviño)

testSlotsLayout: verify that item height changed

2135. By Marco Trevisan (Treviño)

testSlotsLayout: adding tests for custom padding setting

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.qmake.conf'
2--- .qmake.conf 2016-07-25 14:02:18 +0000
3+++ .qmake.conf 2016-09-27 15:29:21 +0000
4@@ -10,18 +10,18 @@
5
6 MODULE_VERSION = 5.5.0
7
8-ROOT_SOURCE_DIR=$$PWD
9-ROOT_BUILD_DIR=$$shadowed($$PWD)
10-
11-exists($$PWD/../qt.pro) {
12- CONFIG += build_with_qt
13-}
14-
15-*-g++* {
16- GCC4 = $$system( gcc -dumpversion | grep "^4.[0-9]" )
17- if (isEmpty(GCC4)) {
18- QMAKE_CXXFLAGS += -Wsuggest-override
19- }
20+ROOT_SOURCE_DIR = $$PWD
21+ROOT_BUILD_DIR = $$shadowed($$PWD)
22+
23+exists($$PWD/../qt.pro): CONFIG += qt_submodule_build
24+
25+# Set QT_CLANG_*_VERSION if not defined to make internal qmake features
26+# (warnings_are_errors and others) work since these variables are defined only
27+# when clang is chosen as compiler at configure time. The regexp is based on the
28+# Qt one used in the qtbase configure script.
29+clang:!defined(QT_CLANG_MAJOR_VERSION, var) {
30+ QT_CLANG_MAJOR_VERSION = $$system("clang -v 2>&1 | sed -n -E '/^clang version /{s///; s/^([0-9]*)\.([0-9]*).*$/\1/;p;q;}'")
31+ QT_CLANG_MINOR_VERSION = $$system("clang -v 2>&1 | sed -n -E '/^clang version /{s///; s/^([0-9]*)\.([0-9]*).*$/\2/;p;q;}'")
32 }
33
34 # FIXME: Fix bug 1606247 and enable the UbuntuToolkit namespace.
35
36=== added file 'CODING'
37--- CODING 1970-01-01 00:00:00 +0000
38+++ CODING 2016-09-27 15:29:21 +0000
39@@ -0,0 +1,63 @@
40+C++ coding style
41+================
42+
43+The Ubuntu UI Toolkit follows the Qt conventions, see:
44+
45+ - https://wiki.qt.io/Coding_Conventions
46+ - https://wiki.qt.io/Qt_Coding_Style
47+
48+On top of it we add the few clarifications listed below.
49+
50+
51+Header inclusion
52+----------------
53+
54+1/ When including Qt or UITK headers, always prefix with the project name. Use:
55+
56+ #include <QtCore/QMap>
57+ #include <UbuntuMetrics/applicationmonitor.h>
58+
59+ not
60+
61+ #include <QMap>
62+ #include <applicationmonitor.h>
63+
64+2/ For readability reasons and to avoid hidden dependencies, headers should be
65+ included in ordered sections, separated by an empty line, as follows:
66+
67+ // The project's related header (for instance here for foo.cpp).
68+ #include "foo.h"
69+
70+ // C standard library headers.
71+ #include <sys/types.h>
72+ #include <unistd.h>
73+
74+ // C++ standard library headers.
75+ #include <functional>
76+ #include <hash_map>
77+ #include <vector>
78+
79+ // Qt and UITK headers. Try to first list QtCore and QtGui headers. Private
80+ // headers come right after public headers of the same project.
81+ #include <QtCore/QDebug>
82+ #include <QtCore/QHash>
83+ #include <QtCore/private/qobject_p.h>
84+ #include <QtGui/QWindow>
85+ #include <QtGui/private/qcolor_p.h>
86+ #include <UbuntuMetrics/applicationmonitor.h>
87+
88+ // Other libraries headers.
89+ #include <gst/gst.h>
90+ #include <boost/call_traits.hpp>
91+
92+ // The project's headers.
93+ #include "bar.h"
94+ #include "baz_p.h"
95+
96+3/ For libraries, the "foo" inclusion variant must be used in C++
97+ source files for the project's headers. The <Project/foo.h> and
98+ <Project/private/foo_p.h> inclusion variant must be used for the
99+ project's headers in private and public headers, wherever the
100+ header is located in the source tree. That ensures the inclusion of
101+ private headers by external projects (or by our unit tests) won't
102+ break.
103
104=== modified file 'debian/control'
105--- debian/control 2016-08-22 05:35:24 +0000
106+++ debian/control 2016-09-27 15:29:21 +0000
107@@ -55,7 +55,7 @@
108 qtsvg5-doc-html,
109 qttools5-dev-tools,
110 qtwebkit5-doc-html,
111- suru-icon-theme,
112+ suru-icon-theme (>= 14.04+16.10.20160720),
113 unity-action-doc,
114 uuid-runtime,
115 xvfb,
116@@ -80,7 +80,7 @@
117 qml-module-ubuntu-components-labs,
118 qml-module-ubuntu-performancemetrics,
119 qtdeclarative5-unity-action-plugin (>= 1.1.0),
120- suru-icon-theme,
121+ suru-icon-theme (>= 14.04+16.10.20160720),
122 ttf-ubuntu-font-family,
123 ubuntu-ui-toolkit-theme (= ${binary:Version}),
124 ${misc:Depends},
125
126=== modified file 'debian/copyright'
127--- debian/copyright 2016-03-04 11:59:46 +0000
128+++ debian/copyright 2016-09-27 15:29:21 +0000
129@@ -6,9 +6,10 @@
130 Copyright: 2012-2013 Canonical Ltd.
131 License: LGPL-3.0
132
133-Files: modules/Ubuntu/Components/Themes/Ambiance/artwork/*
134- modules/Ubuntu/Components/artwork/*
135- modules/Ubuntu/Components/ListItems/artwork/*
136+Files: src/imports/Components/artwork/*
137+ src/imports/Components/Themes/Ambiance/artwork/*
138+ src/imports/Components/Themes/SuruDark/artwork/*
139+ src/imports/Components/Themes/SuruGradient/artwork/*
140 Copyright: 2004-2013, Canonical Ltd.
141 License: CC-BY-SA-3.0
142 Unless otherwise indicated, artwork is available under the Creative
143@@ -335,7 +336,7 @@
144 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
145 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
146
147-Files: modules/Ubuntu/Components/tools/3rd_party/edtaa3func.c
148+Files: src/UbuntuToolkit/tools/3rd_party/edtaa3func.c
149 Copyright: 2009-2012, Stefan Gustavson <stefan.gustavson@gmail.com>
150 License: MIT
151
152
153=== modified file 'debian/rules'
154--- debian/rules 2016-08-30 14:25:49 +0000
155+++ debian/rules 2016-09-27 15:29:21 +0000
156@@ -13,10 +13,10 @@
157
158 # Skip tests on the archs they are known to be flaky with current configuration
159 testskip_architectures := powerpc arm64 ppc64el s390x
160-testskip_series := yakkety xenial
161+testskip_series :=
162
163 override_dh_auto_configure:
164- qmake -r
165+ qmake -r CONFIG+=debian_build
166
167 %:
168 dh $@ --parallel
169
170=== modified file 'documentation/docs.sh'
171--- documentation/docs.sh 2016-07-18 11:39:59 +0000
172+++ documentation/docs.sh 2016-09-27 15:29:21 +0000
173@@ -13,7 +13,15 @@
174 #
175 # You should have received a copy of the GNU Lesser General Public License
176 # along with this program. If not, see <http://www.gnu.org/licenses/>.
177-#
178+
179+# FIXME(loicm)
180+# Since the new src/ layout (src/imports/ for QML modules and src/ for libs),
181+# the parsing order of the source files has changed. qdoc first stores all the
182+# file names and then does a sort (QMap iteration) which makes
183+# ucmainviewbase.cpp parsed before MainView.qml (UbuntuToolkit is sorted before
184+# imports ASCII-wise). The result is that qdoc is unable to link to properties
185+# inherited from UCMainViewBase like applicationName, so constructs like that
186+# don't work: \l MainView::applicationName...
187
188 QDOC=$1
189 QHELPGENERATOR=$2
190
191=== modified file 'documentation/documentation.pro'
192--- documentation/documentation.pro 2015-08-13 09:20:05 +0000
193+++ documentation/documentation.pro 2016-09-27 15:29:21 +0000
194@@ -17,7 +17,7 @@
195 generate_docs.commands = cd $$ROOT_SOURCE_DIR; SRC=$$ROOT_SOURCE_DIR/documentation BLD=$$ROOT_BUILD_DIR/documentation $$ROOT_SOURCE_DIR/documentation/docs.sh \'$$QDOC\' \'$$QHELPGENERATOR\' $$DOC_PATH
196
197 #install the online docs only when building outside of Qt
198-!build_with_qt{
199+!qt_submodule_build{
200 install_docs.files = $$shadowed($$ROOT_SOURCE_DIR)/documentation/html
201 install_docs.path = /usr/share/ubuntu-ui-toolkit/doc
202 install_docs.CONFIG += no_check_exist directory no_build
203
204=== modified file 'documentation/statesaving.qdoc'
205--- documentation/statesaving.qdoc 2016-01-22 14:58:16 +0000
206+++ documentation/statesaving.qdoc 2016-09-27 15:29:21 +0000
207@@ -53,7 +53,7 @@
208 for the application. However runtime application name change would require
209 application restart.
210
211- Having these preconditions, we can deduct that \l MainView::applicationName
212+ Having these preconditions, we can deduct that \l {MainView}'s applicationName
213 property is one of the properties which cannot be serialized.
214
215 \section1 IDs
216
217=== modified file 'documentation/ubuntu-theming.qdoc'
218--- documentation/ubuntu-theming.qdoc 2016-03-17 17:43:14 +0000
219+++ documentation/ubuntu-theming.qdoc 2016-09-27 15:29:21 +0000
220@@ -127,7 +127,7 @@
221 * A typical example of such a style API is the PullToRefresh component's style:
222 * \snippet Styles/1.2/PullToRefreshStyle.qml 0
223 * The default style implementation can be found under Ubuntu.Components.Themes.Ambiance
224- * theme \l {http://bazaar.launchpad.net/~ubuntu-sdk-team/ubuntu-ui-toolkit/trunk/view/head:/src/Ubuntu/Components/Themes/Ambiance/1.3/PullToRefreshStyle.qml}
225+ * theme \l {http://bazaar.launchpad.net/~ubuntu-sdk-team/ubuntu-ui-toolkit/trunk/view/head:/src/imports/Components/Themes/Ambiance/1.3/PullToRefreshStyle.qml}
226 * {PullToRefreshStyle.qml}.
227 *
228 * Beside these, component styles may provide default values for colors, fonts, widths,
229
230=== modified file 'documentation/ubuntu-ui-toolkit-common.qdocconf'
231--- documentation/ubuntu-ui-toolkit-common.qdocconf 2016-06-21 14:21:46 +0000
232+++ documentation/ubuntu-ui-toolkit-common.qdocconf 2016-09-27 15:29:21 +0000
233@@ -4,36 +4,36 @@
234 defines = Q_QDOC
235 sourcedirs = ./
236 headerdirs = ../include
237-sourcedirs += ../src/Ubuntu/Components
238-headerdirs += ../src/Ubuntu/Components/plugin
239-sourcedirs += ../src/Ubuntu/UbuntuToolkit
240-headerdirs += ../src/Ubuntu/UbuntuToolkit
241-sourcedirs += ../src/Ubuntu/UbuntuGestures
242-headerdirs += ../src/Ubuntu/UbuntuGestures
243-sourcedirs += ../src/Ubuntu/Layouts
244-headerdirs += ../src/Ubuntu/Layouts/plugin
245-sourcedirs += ../src/Ubuntu/PerformanceMetrics
246-headerdirs += ../src/Ubuntu/PerformanceMetrics/plugin
247-sourcedirs += ../src/Ubuntu/Test
248-headerdirs += ../src/Ubuntu/Test/plugin
249+sourcedirs += ../src/imports/Components
250+headerdirs += ../src/imports/Components/plugin
251+sourcedirs += ../src/UbuntuToolkit
252+headerdirs += ../src/UbuntuToolkit
253+sourcedirs += ../src/UbuntuGestures
254+headerdirs += ../src/UbuntuGestures
255+sourcedirs += ../src/imports/Layouts
256+headerdirs += ../src/imports/Layouts/plugin
257+sourcedirs += ../src/imports/PerformanceMetrics
258+headerdirs += ../src/imports/PerformanceMetrics/plugin
259+sourcedirs += ../src/imports/Test
260+headerdirs += ../src/imports/Test/plugin
261 exampledirs += snippets
262 exampledirs += ../examples
263-exampledirs += ../src/Ubuntu/Components
264-excludedirs += ../src/Ubuntu/Components/1.0
265-excludedirs += ../src/Ubuntu/Components/1.1
266-excludedirs += ../src/Ubuntu/Components/1.2
267-excludedirs += ../src/Ubuntu/Components/ListItems/1.2
268-excludedirs += ../src/Ubuntu/Components/Pickers/1.2
269-excludedirs += ../src/Ubuntu/Components/Popups/1.2
270-excludedirs += ../src/Ubuntu/Components/Themes/Ambiance
271-excludedirs += ../src/Ubuntu/Components/Themes/SuruDark
272+exampledirs += ../src/imports/Components
273+excludedirs += ../src/imports/Components/1.0
274+excludedirs += ../src/imports/Components/1.1
275+excludedirs += ../src/imports/Components/1.2
276+excludedirs += ../src/imports/Components/ListItems/1.2
277+excludedirs += ../src/imports/Components/Pickers/1.2
278+excludedirs += ../src/imports/Components/Popups/1.2
279+excludedirs += ../src/imports/Components/Themes/Ambiance
280+excludedirs += ../src/imports/Components/Themes/SuruDark
281 excludedirs += ../documentation/autopilot-helpers/_build/html/_static
282 imagedirs = images
283 sources.fileextensions = "*.qml *.qdoc *.cpp *.js"
284 headers.fileextensions = "*.h"
285 # exclude qml files that have the component documented in a separate qdoc file
286-excludefiles += $BLD/../src/Ubuntu/Components/1.3/PageWrapperUtils.js
287-excludefiles += ../src/Ubuntu/UbuntuToolkit/asyncloader.cpp
288+excludefiles += $BLD/../src/imports/Components/1.3/PageWrapperUtils.js
289+excludefiles += ../src/UbuntuToolkit/asyncloader.cpp
290 outputdir = $BLD/html
291 outputformats = HTML
292 version = 1.3
293
294=== modified file 'examples/ubuntu-ui-toolkit-gallery/ProgressBars.qml'
295--- examples/ubuntu-ui-toolkit-gallery/ProgressBars.qml 2015-04-25 08:18:45 +0000
296+++ examples/ubuntu-ui-toolkit-gallery/ProgressBars.qml 2016-09-27 15:29:21 +0000
297@@ -56,13 +56,13 @@
298 }
299
300 TemplateRow {
301- title: i18n.tr("No label")
302+ title: progressTypeFlip.indeterminate ? i18n.tr("Infinite") : i18n.tr("Standard")
303
304 ProgressBar {
305- id: progressNoLabel
306+ id: progressTypeFlip
307 objectName: "progressbar_nolabel"
308- width: parent.width
309- showProgressPercentage: false
310+ anchors.verticalCenter: parent.verticalCenter
311+ width: parent.width - (switchBox.width + label.width + 2 * parent.spacing)
312
313 SequentialAnimation on value {
314 loops: Animation.Infinite
315@@ -74,6 +74,15 @@
316 PauseAnimation {duration: 1000}
317 }
318 }
319+ Switch {
320+ id: switchBox
321+ checked: progressTypeFlip.indeterminate
322+ onTriggered: progressTypeFlip.indeterminate = !progressTypeFlip.indeterminate
323+ }
324+ Label {
325+ id: label
326+ text: progressTypeFlip.indeterminate ? i18n.tr("to standard") : i18n.tr("to infinite")
327+ }
328 }
329 }
330
331
332=== added file 'features/ubuntu_common.prf'
333--- features/ubuntu_common.prf 1970-01-01 00:00:00 +0000
334+++ features/ubuntu_common.prf 2016-09-27 15:29:21 +0000
335@@ -0,0 +1,53 @@
336+# The qtbase packaging for Ubuntu exports the CFLAGS, CXXFLAGS and LFLAGS
337+# variables in the environment before running configure so that the qtbase
338+# shared libraries can be compiled with the required distribution defined
339+# compiler flags. That is fine (though I guess that could be handled better at
340+# the qtbase packaging level with maybe a dedicated prf) but it results in
341+# qt_build_config.prf defining the QMAKE_CFLAGS, QMAKE_CXXFLAGS and QMAKE_LFLAGS
342+# variables with these distribution specific flags. Since we load this prf,
343+# these variables end up being defined when building the toolkit for development
344+# purpose. This is problematic because -O2 and -g are always defined (whatever
345+# the debug or release config chosen by the developer), also these are GCC
346+# specific flags which makes our build break with other compilers. This is also
347+# ugly because preprocessor defines are directly set in the QMAKE_C*FLAGS. In
348+# order to workaround these issues, we unset these variables and set the
349+# different flags apart from -g and -O2 in the right qmake variables. This
350+# allows to keep compiling with the Debian flags but in a more flexible way.
351+!qt_submodule_build:!debian_build {
352+ gcc:!clang {
353+ QMAKE_CFLAGS = -fstack-protector
354+ QMAKE_CXXFLAGS = -fstack-protector
355+ QMAKE_CXXFLAGS_WARN_ON += -Wdate-time -Wformat -Werror=format-security
356+ QMAKE_LFLAGS_SHLIB += -Wl,-z,relro
357+ DEFINES += _FORTIFY_SOURCE=2
358+ unix:!contains(QT_CONFIG, reduce_relocations): CONFIG += bsymbolic_functions
359+ } else {
360+ QMAKE_CFLAGS =
361+ QMAKE_CXXFLAGS =
362+ }
363+ QMAKE_LFLAGS =
364+}
365+
366+# Warn about overriding virtual functions not marked with the override keyword.
367+gcc:!clang {
368+ # Breaks the build when built as a Qt submodule. Should be fixed in Qt 5.6,
369+ # see https://codereview.qt-project.org/#/c/169969/
370+ !qt_submodule_build:!lessThan(QT_GCC_MAJOR_VERSION, 5): \
371+ QMAKE_CXXFLAGS_WARN_ON += -Wsuggest-override
372+} else {
373+ greaterThan(QT_CLANG_MAJOR_VERSION, 3)| \
374+ if(equals(QT_CLANG_MAJOR_VERSION, 3):!lessThan(QT_CLANG_MINOR_VERSION, 6)): \
375+ QMAKE_CXXFLAGS_WARN_ON += -Winconsistent-missing-override
376+}
377+
378+# Use the 2011 ISO C++ standard plus amendments. Since Qt 5.6, GNU extensions
379+# are enabled by default with Clang, GCC and ICC, strict_c++ disables them.
380+CONFIG += c++11
381+greaterThan(QT_MAJOR_VERSION, 5)| \
382+ if(equals(QT_MAJOR_VERSION, 5):!lessThan(QT_MINOR_VERSION, 6)): \
383+ CONFIG += strict_c++
384+
385+CONFIG += no_keywords
386+
387+# Make all warnings into errors.
388+CONFIG += warnings_are_errors
389
390=== modified file 'features/ubuntu_enable_testing.prf'
391--- features/ubuntu_enable_testing.prf 2015-08-13 09:20:05 +0000
392+++ features/ubuntu_enable_testing.prf 2016-09-27 15:29:21 +0000
393@@ -1,6 +1,6 @@
394 instbase = $$ROOT_BUILD_DIR/qml
395
396-!build_with_qt {
397+!qt_submodule_build {
398 # These bizarre rules copy the files to the build directory
399
400 defineReplace(qmlModStripSrcDir) {
401
402=== modified file 'features/ubuntu_qml_plugin.prf'
403--- features/ubuntu_qml_plugin.prf 2016-06-17 13:42:23 +0000
404+++ features/ubuntu_qml_plugin.prf 2016-09-27 15:29:21 +0000
405@@ -1,11 +1,13 @@
406+load(ubuntu_common)
407 load(qml_plugin)
408+
409 CONFIG -= hide_symbols
410
411 load(ubuntu_enable_testing)
412
413 #hacky hacks to build the qmltypes
414
415-!build_with_qt{
416+!qt_submodule_build {
417 #should be already set by the qml_plugin.prf, but lets be safe
418 isEmpty(IMPORT_VERSION): error("Must set IMPORT_VERSION")
419
420@@ -71,18 +73,6 @@
421 QMAKE_EXTRA_TARGETS += autobld_qmltypes
422 }
423
424-# when building against the system Qt we pick up the CXX_FLAGS for a release build
425-# reset them to the default debug build flags
426-!build_with_qt: {
427- CONFIG(debug, debug|release) {
428- QMAKE_CFLAGS = $$QMAKE_CFLAGS_DEBUG
429- QMAKE_CXXFLAGS = $$QMAKE_CXXFLAGS_DEBUG
430- }
431-}
432-
433-QMAKE_CXXFLAGS += -Werror
434-
435-#do not warn for deprecated declarations
436-QMAKE_CXXFLAGS -= -Werror=deprecated-declarations
437-DEFINES -= QT_DEPRECATED_WARNINGS
438-
439+# warnings_are_errors depending on the compiler version, sometimes it doesn't
440+# add the required flags (for instance for recent clang version on old Qt).
441+!contains(QMAKE_CXXFLAGS_WARN_ON, -Werror): QMAKE_CXXFLAGS_WARN_ON += -Werror
442
443=== modified file 'features/ubuntu_qt_module.prf'
444--- features/ubuntu_qt_module.prf 2016-06-17 13:42:23 +0000
445+++ features/ubuntu_qt_module.prf 2016-09-27 15:29:21 +0000
446@@ -1,23 +1,23 @@
447-!build_with_qt: {
448- #enable autocreation of include directory
449- CONFIG += git_build
450-}
451+load(ubuntu_common)
452+
453+# Enables the copy of private and public headers to an include directory at the
454+# root of the sources before compilation and the copy of the compiled libraries
455+# after compilation. Must be set before loading qt_module.
456+CONFIG += git_build
457+
458+# Make sure our public headers compile with extra warnings and strict Qt
459+# options. Must be set before loading qt_module. Requires qt_module_headers to
460+# be loaded after qt_module.
461+CONFIG += headersclean
462
463 load(qt_module)
464+load(qt_module_headers)
465
466+# Disable CMake config file creation. Must be set after loading qt_module.
467 CONFIG -= create_cmake
468
469-# when building against the system Qt we pick up the CXX_FLAGS for a release build
470-# reset them to the default debug build flags
471-!build_with_qt: {
472- CONFIG(debug, debug|release) {
473- QMAKE_CFLAGS = $$QMAKE_CFLAGS_DEBUG
474- QMAKE_CXXFLAGS = $$QMAKE_CXXFLAGS_DEBUG
475- }
476-}
477-
478-QMAKE_CXXFLAGS += -Werror
479-
480-#do not warn for deprecated declarations
481-QMAKE_CXXFLAGS -= -Werror=deprecated-declarations
482-DEFINES -= QT_DEPRECATED_WARNINGS
483+CONFIG += dll
484+
485+# warnings_are_errors depending on the compiler version, sometimes it doesn't
486+# add the required flags (for instance for recent clang version on old Qt).
487+!contains(QMAKE_CXXFLAGS_WARN_ON, -Werror): QMAKE_CXXFLAGS_WARN_ON += -Werror
488
489=== added file 'snapcraft.yaml'
490--- snapcraft.yaml 1970-01-01 00:00:00 +0000
491+++ snapcraft.yaml 2016-09-27 15:29:21 +0000
492@@ -0,0 +1,42 @@
493+name: ubuntu-ui-toolkit
494+version: '1.3.2085+16.10.20160915'
495+summary: Ubuntu UI Toolkit
496+description: |
497+ Qt is a cross-platform C++ application framework. Qt's primary feature
498+ is its rich set of widgets that provide standard GUI functionality.
499+ This package includes UITK.
500+
501+grade: stable
502+confinement: strict
503+
504+slots:
505+ ubuntu-ui-toolkit-slot:
506+ content: ubuntu-ui-toolkit
507+ interface: content
508+ read:
509+ - /
510+
511+parts:
512+ ubuntu-ui-toolkit:
513+ plugin: qmake
514+ qt-version: qt5
515+ options:
516+ - QT_QPA_PLATFORM=minimal
517+ source: .
518+ build-packages:
519+ - dbus
520+ - dbus-test-runner
521+ - devscripts
522+ - gdb
523+ - libdbus-1-dev
524+ - liblttng-ust-dev
525+ - libnih-dbus-dev
526+ - libqt5svg5-dev
527+ - qtdeclarative5-unity-action-plugin
528+ - qtpim5-dev
529+ stage-packages:
530+ - libnih-dbus1
531+ - qtdeclarative5-unity-action-plugin
532+ - suru-icon-theme
533+ - ttf-ubuntu-font-family
534+
535
536=== removed directory 'src/Ubuntu/Components/ListItems/artwork'
537=== renamed directory 'src/Ubuntu/UbuntuGestures' => 'src/UbuntuGestures'
538=== modified file 'src/UbuntuGestures/UbuntuGestures.pro'
539--- src/Ubuntu/UbuntuGestures/UbuntuGestures.pro 2016-07-06 11:27:11 +0000
540+++ src/UbuntuGestures/UbuntuGestures.pro 2016-09-27 15:29:21 +0000
541@@ -1,40 +1,31 @@
542-TEMPLATE=lib
543-TARGET=UbuntuGestures
544-
545-QT *= core-private gui-private qml qml-private quick quick-private
546-
547-CONFIG += dll no_keywords c++11
548-
549-INCLUDEPATH+=$$PWD
550-
551-DEFINES += UBUNTUGESTURES_LIBRARY
552-
553-load(qt_build_config)
554+TARGET = UbuntuGestures
555+QT = core-private gui-private qml-private quick-private
556+
557+HEADERS += \
558+ $$PWD/candidateinactivitytimer_p.h \
559+ $$PWD/damper_p.h \
560+ $$PWD/debughelpers_p.h \
561+ $$PWD/pool_p.h \
562+ $$PWD/timer_p.h \
563+ $$PWD/timesource_p.h \
564+ $$PWD/touchownershipevent_p.h \
565+ $$PWD/touchregistry_p.h \
566+ $$PWD/ubuntugesturesglobal.h \
567+ $$PWD/ubuntugesturesmodule.h \
568+ $$PWD/ucswipearea_p.h \
569+ $$PWD/ucswipearea_p_p.h \
570+ $$PWD/unownedtouchevent_p.h
571+
572+SOURCES += \
573+ $$PWD/candidateinactivitytimer.cpp \
574+ $$PWD/damper.cpp \
575+ $$PWD/debughelpers.cpp \
576+ $$PWD/timer.cpp \
577+ $$PWD/timesource.cpp \
578+ $$PWD/touchownershipevent.cpp \
579+ $$PWD/touchregistry.cpp \
580+ $$PWD/ubuntugesturesmodule.cpp \
581+ $$PWD/ucswipearea.cpp \
582+ $$PWD/unownedtouchevent.cpp
583+
584 load(ubuntu_qt_module)
585-
586-HEADERS += candidateinactivitytimer_p.h \
587- debughelpers_p.h \
588- timer_p.h \
589- timesource_p.h \
590- touchownershipevent_p.h \
591- touchregistry_p.h \
592- unownedtouchevent_p.h \
593- ubuntugesturesglobal.h \
594- pool_p.h \
595- ucswipearea_p.h \
596- ucswipearea_p_p.h \
597- damper_p.h \
598- ubuntugesturesmodule.h
599-
600-
601-SOURCES += candidateinactivitytimer.cpp \
602- debughelpers.cpp \
603- timer.cpp \
604- timesource.cpp \
605- touchownershipevent.cpp \
606- touchregistry.cpp \
607- unownedtouchevent.cpp \
608- ucswipearea.cpp \
609- damper.cpp \
610- ubuntugesturesmodule.cpp
611-
612
613=== modified file 'src/UbuntuGestures/candidateinactivitytimer.cpp'
614--- src/Ubuntu/UbuntuGestures/candidateinactivitytimer.cpp 2016-07-06 11:27:11 +0000
615+++ src/UbuntuGestures/candidateinactivitytimer.cpp 2016-09-27 15:29:21 +0000
616@@ -14,7 +14,7 @@
617 * along with this program. If not, see <http://www.gnu.org/licenses/>.
618 */
619
620-#include <UbuntuGestures/private/candidateinactivitytimer_p.h>
621+#include "candidateinactivitytimer_p.h"
622
623 UG_NAMESPACE_BEGIN
624
625
626=== modified file 'src/UbuntuGestures/candidateinactivitytimer_p.h'
627--- src/Ubuntu/UbuntuGestures/candidateinactivitytimer_p.h 2016-08-09 07:12:07 +0000
628+++ src/UbuntuGestures/candidateinactivitytimer_p.h 2016-09-27 15:29:21 +0000
629@@ -14,15 +14,15 @@
630 * along with this program. If not, see <http://www.gnu.org/licenses/>.
631 */
632
633-#ifndef UBUNTUGESTURES_CANDIDATE_INACTIVITY_TIMER_H
634-#define UBUNTUGESTURES_CANDIDATE_INACTIVITY_TIMER_H
635-
636-#include <QObject>
637+#ifndef CANDIDATEINACTIVITYTIMER_P_H
638+#define CANDIDATEINACTIVITYTIMER_P_H
639+
640+#include <QtCore/QObject>
641+
642+#include <UbuntuGestures/private/timer_p.h>
643
644 class QQuickItem;
645
646-#include <UbuntuGestures/private/timer_p.h>
647-
648 UG_NAMESPACE_BEGIN
649
650 class UBUNTUGESTURES_EXPORT CandidateInactivityTimer : public QObject {
651@@ -48,4 +48,4 @@
652
653 UG_NAMESPACE_END
654
655-#endif // UBUNTUGESTURES_CANDIDATE_INACTIVITY_TIMER_H
656+#endif // CANDIDATEINACTIVITYTIMER_P_H
657
658=== modified file 'src/UbuntuGestures/damper.cpp'
659--- src/Ubuntu/UbuntuGestures/damper.cpp 2015-12-17 15:23:26 +0000
660+++ src/UbuntuGestures/damper.cpp 2016-09-27 15:29:21 +0000
661@@ -15,7 +15,8 @@
662 */
663
664 #include "damper_p.h"
665-#include <QDebug>
666+
667+#include <QtCore/QDebug>
668
669 QDebug operator<<(QDebug dbg, const DampedPointF &p)
670 {
671
672=== modified file 'src/UbuntuGestures/damper_p.h'
673--- src/Ubuntu/UbuntuGestures/damper_p.h 2015-12-17 15:23:26 +0000
674+++ src/UbuntuGestures/damper_p.h 2016-09-27 15:29:21 +0000
675@@ -14,8 +14,8 @@
676 * along with this program. If not, see <http://www.gnu.org/licenses/>.
677 */
678
679-#ifndef UBUNTU_GESTURES_DAMPER_H
680-#define UBUNTU_GESTURES_DAMPER_H
681+#ifndef DAMPER_P_H
682+#define DAMPER_P_H
683
684 #include <QtCore/QPointF>
685
686@@ -86,4 +86,4 @@
687
688 QDebug operator<<(QDebug dbg, const DampedPointF &p);
689
690-#endif // UBUNTU_GESTURES_DAMPER_H
691+#endif // DAMPER_P_H
692
693=== modified file 'src/UbuntuGestures/debughelpers.cpp'
694--- src/Ubuntu/UbuntuGestures/debughelpers.cpp 2016-07-06 11:27:11 +0000
695+++ src/UbuntuGestures/debughelpers.cpp 2016-09-27 15:29:21 +0000
696@@ -14,9 +14,10 @@
697 * along with this program. If not, see <http://www.gnu.org/licenses/>.
698 */
699
700-#include <UbuntuGestures/private/debughelpers_p.h>
701-#include <QTouchEvent>
702-#include <QMouseEvent>
703+#include "debughelpers_p.h"
704+
705+#include <QtGui/QMouseEvent>
706+#include <QtGui/QTouchEvent>
707
708 QString touchPointStateToString(Qt::TouchPointState state)
709 {
710
711=== modified file 'src/UbuntuGestures/debughelpers_p.h'
712--- src/Ubuntu/UbuntuGestures/debughelpers_p.h 2016-08-09 07:12:07 +0000
713+++ src/UbuntuGestures/debughelpers_p.h 2016-09-27 15:29:21 +0000
714@@ -14,12 +14,10 @@
715 * along with this program. If not, see <http://www.gnu.org/licenses/>.
716 */
717
718-#ifndef UBUNTUGESTURES_DEBUG_HELPER_H
719-#define UBUNTUGESTURES_DEBUG_HELPER_H
720-
721-#include <QString>
722-
723-#include "ubuntugesturesglobal.h"
724+#ifndef DEBUGHELPERS_P_H
725+#define DEBUGHELPERS_P_H
726+
727+#include <QtCore/QString>
728
729 class QMouseEvent;
730 class QTouchEvent;
731@@ -28,4 +26,4 @@
732 QString touchEventToString(const QTouchEvent *ev);
733 QString mouseEventToString(const QMouseEvent *ev);
734
735-#endif // UBUNTUGESTURES_DEBUG_HELPER_H
736+#endif // DEBUGHELPERS_P_H
737
738=== modified file 'src/UbuntuGestures/pool_p.h'
739--- src/Ubuntu/UbuntuGestures/pool_p.h 2016-08-09 07:12:07 +0000
740+++ src/UbuntuGestures/pool_p.h 2016-09-27 15:29:21 +0000
741@@ -14,12 +14,12 @@
742 * along with this program. If not, see <http://www.gnu.org/licenses/>.
743 */
744
745-#ifndef UBUNTUGESTURES_POOL_H
746-#define UBUNTUGESTURES_POOL_H
747-
748-#include <QVector>
749-
750-#include "ubuntugesturesglobal.h"
751+#ifndef POOL_P_H
752+#define POOL_P_H
753+
754+#include <QtCore/QVector>
755+
756+#include <UbuntuGestures/ubuntugesturesglobal.h>
757
758 /*
759 An object pool.
760@@ -129,4 +129,4 @@
761 int m_lastUsedIndex;
762 };
763
764-#endif // UBUNTUGESTURES_POOL_H
765+#endif // POOL_P_H
766
767=== modified file 'src/UbuntuGestures/timer.cpp'
768--- src/Ubuntu/UbuntuGestures/timer.cpp 2016-07-25 14:02:18 +0000
769+++ src/UbuntuGestures/timer.cpp 2016-09-27 15:29:21 +0000
770@@ -14,7 +14,7 @@
771 * along with this program. If not, see <http://www.gnu.org/licenses/>.
772 */
773
774-#include <UbuntuGestures/private/timer_p.h>
775+#include "timer_p.h"
776
777 UG_NAMESPACE_BEGIN
778
779
780=== modified file 'src/UbuntuGestures/timer_p.h'
781--- src/Ubuntu/UbuntuGestures/timer_p.h 2016-08-09 07:12:07 +0000
782+++ src/UbuntuGestures/timer_p.h 2016-09-27 15:29:21 +0000
783@@ -14,16 +14,16 @@
784 * along with this program. If not, see <http://www.gnu.org/licenses/>.
785 */
786
787-#ifndef UBUNTUGESTURES_TIMER_H
788-#define UBUNTUGESTURES_TIMER_H
789-
790-#include "ubuntugesturesglobal.h"
791+#ifndef TIMER_P_H
792+#define TIMER_P_H
793+
794+#include <QtCore/QObject>
795+#include <QtCore/QPointer>
796+#include <QtCore/QTimer>
797+
798+#include <UbuntuGestures/ubuntugesturesglobal.h>
799 #include <UbuntuGestures/private/timesource_p.h>
800
801-#include <QObject>
802-#include <QPointer>
803-#include <QTimer>
804-
805 UG_NAMESPACE_BEGIN
806
807 /* Defines an interface for a Timer. */
808@@ -114,4 +114,4 @@
809
810 UG_NAMESPACE_END
811
812-#endif // UBUNTUGESTURES_TIMER_H
813+#endif // TIMER_P_H
814
815=== modified file 'src/UbuntuGestures/timesource.cpp'
816--- src/Ubuntu/UbuntuGestures/timesource.cpp 2016-07-25 14:02:18 +0000
817+++ src/UbuntuGestures/timesource.cpp 2016-09-27 15:29:21 +0000
818@@ -16,9 +16,9 @@
819 * Authored by: Daniel d'Andrada <daniel.dandrada@canonical.com>
820 */
821
822-#include <UbuntuGestures/private/timesource_p.h>
823+#include "timesource_p.h"
824
825-#include <QElapsedTimer>
826+#include <QtCore/QElapsedTimer>
827
828 UG_NAMESPACE_BEGIN
829
830
831=== modified file 'src/UbuntuGestures/timesource_p.h'
832--- src/Ubuntu/UbuntuGestures/timesource_p.h 2016-08-09 07:12:07 +0000
833+++ src/UbuntuGestures/timesource_p.h 2016-09-27 15:29:21 +0000
834@@ -16,11 +16,12 @@
835 * Authored by: Daniel d'Andrada <daniel.dandrada@canonical.com>
836 */
837
838-#ifndef UBUNTUGESTURES_TIMESOURCE_H
839-#define UBUNTUGESTURES_TIMESOURCE_H
840-
841-#include "ubuntugesturesglobal.h"
842-#include <QSharedPointer>
843+#ifndef TIMESOURCE_P_H
844+#define TIMESOURCE_P_H
845+
846+#include <QtCore/QSharedPointer>
847+
848+#include <UbuntuGestures/ubuntugesturesglobal.h>
849
850 UG_NAMESPACE_BEGIN
851 /*
852@@ -59,4 +60,4 @@
853
854 UG_NAMESPACE_END
855
856-#endif // UBUNTUGESTURES_TIMESOURCE_H
857+#endif // TIMESOURCE_P_H
858
859=== modified file 'src/UbuntuGestures/touchownershipevent.cpp'
860--- src/Ubuntu/UbuntuGestures/touchownershipevent.cpp 2016-07-06 11:27:11 +0000
861+++ src/UbuntuGestures/touchownershipevent.cpp 2016-09-27 15:29:21 +0000
862@@ -14,7 +14,7 @@
863 * along with this program. If not, see <http://www.gnu.org/licenses/>.
864 */
865
866-#include <UbuntuGestures/private/touchownershipevent_p.h>
867+#include "touchownershipevent_p.h"
868
869 UG_NAMESPACE_BEGIN
870
871
872=== modified file 'src/UbuntuGestures/touchownershipevent_p.h'
873--- src/Ubuntu/UbuntuGestures/touchownershipevent_p.h 2016-08-09 07:12:07 +0000
874+++ src/UbuntuGestures/touchownershipevent_p.h 2016-09-27 15:29:21 +0000
875@@ -14,11 +14,12 @@
876 * along with this program. If not, see <http://www.gnu.org/licenses/>.
877 */
878
879-#ifndef UBUNTU_TOUCHOWNERSHIPEVENT_H
880-#define UBUNTU_TOUCHOWNERSHIPEVENT_H
881-
882-#include <QEvent>
883-#include "ubuntugesturesglobal.h"
884+#ifndef TOUCHOWNERSHIPEVENT_P_H
885+#define TOUCHOWNERSHIPEVENT_P_H
886+
887+#include <QtCore/QEvent>
888+
889+#include <UbuntuGestures/ubuntugesturesglobal.h>
890
891 UG_NAMESPACE_BEGIN
892 /*
893@@ -50,4 +51,4 @@
894
895 UG_NAMESPACE_END
896
897-#endif // UBUNTU_TOUCHOWNERSHIPEVENT_H
898+#endif // TOUCHOWNERSHIPEVENT_P_H
899
900=== modified file 'src/UbuntuGestures/touchregistry.cpp'
901--- src/Ubuntu/UbuntuGestures/touchregistry.cpp 2016-07-06 11:27:11 +0000
902+++ src/UbuntuGestures/touchregistry.cpp 2016-09-27 15:29:21 +0000
903@@ -14,21 +14,20 @@
904 * along with this program. If not, see <http://www.gnu.org/licenses/>.
905 */
906
907-#include <UbuntuGestures/private/touchregistry_p.h>
908-
909-#include <QCoreApplication>
910-#include <QDebug>
911-
912-#include <private/qquickitem_p.h>
913-
914-#include <UbuntuGestures/private/candidateinactivitytimer_p.h>
915-#include <UbuntuGestures/private/timer_p.h>
916-#include <UbuntuGestures/private/touchownershipevent_p.h>
917-#include <UbuntuGestures/private/unownedtouchevent_p.h>
918+#include "touchregistry_p.h"
919+
920+#include <QtCore/QCoreApplication>
921+#include <QtCore/QDebug>
922+#include <QtQuick/private/qquickitem_p.h>
923+
924+#include "candidateinactivitytimer_p.h"
925+#include "debughelpers_p.h"
926+#include "timer_p.h"
927+#include "touchownershipevent_p.h"
928+#include "unownedtouchevent_p.h"
929
930 Q_LOGGING_CATEGORY(ugTouchRegistry, "libubuntugestures.TouchRegistry", QtMsgType::QtWarningMsg)
931
932-#include <UbuntuGestures/private/debughelpers_p.h>
933 #define UG_DEBUG qCDebug(ugTouchRegistry) << "[TouchRegistry]"
934
935 UG_NAMESPACE_BEGIN
936
937=== modified file 'src/UbuntuGestures/touchregistry_p.h'
938--- src/Ubuntu/UbuntuGestures/touchregistry_p.h 2016-08-09 07:12:07 +0000
939+++ src/UbuntuGestures/touchregistry_p.h 2016-09-27 15:29:21 +0000
940@@ -14,23 +14,21 @@
941 * along with this program. If not, see <http://www.gnu.org/licenses/>.
942 */
943
944-#ifndef UNITY_TOUCHREGISTRY_H
945-#define UNITY_TOUCHREGISTRY_H
946+#ifndef TOUCHREGISTRY_P_H
947+#define TOUCHREGISTRY_P_H
948
949+#include <QtCore/QLoggingCategory>
950+#include <QtCore/QObject>
951+#include <QtCore/QPointer>
952+#include <QtCore/QVector>
953+#include <QtGui/QTouchEvent>
954 #include <QtQuick/QQuickItem>
955-#include <QObject>
956-#include <QPointer>
957-#include <QTouchEvent>
958-#include <QVector>
959
960-#include "ubuntugesturesglobal.h"
961+#include <UbuntuGestures/ubuntugesturesglobal.h>
962 #include <UbuntuGestures/private/candidateinactivitytimer_p.h>
963 #include <UbuntuGestures/private/timer_p.h>
964 #include <UbuntuGestures/private/pool_p.h>
965
966-// logging
967-#include <QtCore/QLoggingCategory>
968-
969 UG_FORWARD_DECLARE_CLASS(AbstractTimerFactory)
970
971 /*
972@@ -206,4 +204,4 @@
973
974 Q_DECLARE_LOGGING_CATEGORY(ugTouchRegistry)
975
976-#endif // UNITY_TOUCHREGISTRY_H
977+#endif // TOUCHREGISTRY_P_H
978
979=== modified file 'src/UbuntuGestures/ubuntugesturesglobal.h'
980--- src/Ubuntu/UbuntuGestures/ubuntugesturesglobal.h 2016-07-08 14:28:48 +0000
981+++ src/UbuntuGestures/ubuntugesturesglobal.h 2016-09-27 15:29:21 +0000
982@@ -14,9 +14,12 @@
983 * along with this program. If not, see <http://www.gnu.org/licenses/>.
984 */
985
986+#ifndef UBUNTUGESTURESGLOBAL_H
987+#define UBUNTUGESTURESGLOBAL_H
988+
989 #include <QtCore/QtGlobal>
990
991-#if defined(UBUNTUGESTURES_LIBRARY)
992+#if defined(QT_BUILD_UBUNTUGESTURES_LIB)
993 # define UBUNTUGESTURES_EXPORT Q_DECL_EXPORT
994 #else
995 # define UBUNTUGESTURES_EXPORT Q_DECL_IMPORT
996@@ -45,3 +48,5 @@
997 #define UG_FORWARD_DECLARE_STRUCT(name) struct name;
998
999 #endif
1000+
1001+#endif // UBUNTUGESTURESGLOBAL_H
1002
1003=== modified file 'src/UbuntuGestures/ubuntugesturesmodule.cpp'
1004--- src/Ubuntu/UbuntuGestures/ubuntugesturesmodule.cpp 2016-06-21 14:21:46 +0000
1005+++ src/UbuntuGestures/ubuntugesturesmodule.cpp 2016-09-27 15:29:21 +0000
1006@@ -16,10 +16,11 @@
1007 * Author: Zsombor Egri <zsombor.egri@canonical.com>
1008 */
1009
1010+#include <QtQml/QtQml>
1011 #include <QtQml/QQmlEngine>
1012-#include <QtQml>
1013+
1014 #include "ubuntugesturesmodule.h"
1015-#include <private/ucswipearea_p.h>
1016+#include "ucswipearea_p.h"
1017
1018 UG_NAMESPACE_BEGIN
1019
1020
1021=== modified file 'src/UbuntuGestures/ubuntugesturesmodule.h'
1022--- src/Ubuntu/UbuntuGestures/ubuntugesturesmodule.h 2016-07-06 09:51:06 +0000
1023+++ src/UbuntuGestures/ubuntugesturesmodule.h 2016-09-27 15:29:21 +0000
1024@@ -19,7 +19,7 @@
1025 #ifndef UBUNTUGESTURESMODULE_H
1026 #define UBUNTUGESTURESMODULE_H
1027
1028-#include <ubuntugesturesglobal.h>
1029+#include <UbuntuGestures/ubuntugesturesglobal.h>
1030
1031 UG_NAMESPACE_BEGIN
1032
1033
1034=== modified file 'src/UbuntuGestures/ucswipearea.cpp'
1035--- src/Ubuntu/UbuntuGestures/ucswipearea.cpp 2016-07-25 14:02:18 +0000
1036+++ src/UbuntuGestures/ucswipearea.cpp 2016-09-27 15:29:21 +0000
1037@@ -12,22 +12,19 @@
1038 *
1039 * You should have received a copy of the GNU General Public License
1040 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1041- *
1042 */
1043
1044 #include "ucswipearea_p_p.h"
1045
1046-#include <QQuickWindow>
1047-#include <QtCore/qmath.h>
1048-#include <QScreen>
1049-#include <QDebug>
1050-
1051-#include <private/qquickwindow_p.h>
1052-
1053-// local
1054-#include <UbuntuGestures/private/touchownershipevent_p.h>
1055-#include <UbuntuGestures/private/touchregistry_p.h>
1056-#include <UbuntuGestures/private/unownedtouchevent_p.h>
1057+#include <QtCore/QDebug>
1058+#include <QtGui/QScreen>
1059+#include <QtCore/QtMath>
1060+#include <QtQuick/QQuickWindow>
1061+#include <QtQuick/private/qquickwindow_p.h>
1062+
1063+#include "touchownershipevent_p.h"
1064+#include "touchregistry_p.h"
1065+#include "unownedtouchevent_p.h"
1066
1067 UG_NAMESPACE_BEGIN
1068
1069
1070=== modified file 'src/UbuntuGestures/ucswipearea_p.h'
1071--- src/Ubuntu/UbuntuGestures/ucswipearea_p.h 2016-07-06 11:27:11 +0000
1072+++ src/UbuntuGestures/ucswipearea_p.h 2016-09-27 15:29:21 +0000
1073@@ -12,22 +12,18 @@
1074 *
1075 * You should have received a copy of the GNU General Public License
1076 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1077- *
1078 */
1079
1080-#ifndef UCSWIPEAREA_H
1081-#define UCSWIPEAREA_H
1082+#ifndef UCSWIPEAREA_P_H
1083+#define UCSWIPEAREA_P_H
1084
1085+#include <QtCore/QLoggingCategory>
1086 #include <QtQuick/QQuickItem>
1087-#include "ubuntugesturesglobal.h"
1088
1089-// lib UbuntuGestures
1090+#include <UbuntuGestures/ubuntugesturesglobal.h>
1091 #include <UbuntuGestures/private/pool_p.h>
1092 #include <UbuntuGestures/private/timer_p.h>
1093
1094-// logging
1095-#include <QtCore/QLoggingCategory>
1096-
1097 UG_NAMESPACE_BEGIN
1098
1099 class TouchOwnershipEvent;
1100@@ -106,4 +102,4 @@
1101 Q_DECLARE_LOGGING_CATEGORY(ucSwipeArea)
1102 Q_DECLARE_LOGGING_CATEGORY(ucActiveTouchInfo)
1103
1104-#endif // UCSWIPEAREA_H
1105+#endif // UCSWIPEAREA_P_H
1106
1107=== modified file 'src/UbuntuGestures/ucswipearea_p_p.h'
1108--- src/Ubuntu/UbuntuGestures/ucswipearea_p_p.h 2016-07-25 14:02:18 +0000
1109+++ src/UbuntuGestures/ucswipearea_p_p.h 2016-09-27 15:29:21 +0000
1110@@ -12,16 +12,16 @@
1111 *
1112 * You should have received a copy of the GNU General Public License
1113 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1114- *
1115 */
1116
1117-#ifndef UCSWIPEAREAPRIVATE_H
1118-#define UCSWIPEAREAPRIVATE_H
1119-
1120-#include "ucswipearea_p.h"
1121+#ifndef UCSWIPEAREA_P_P_H
1122+#define UCSWIPEAREA_P_P_H
1123+
1124+#include <UbuntuGestures/private/ucswipearea_p.h>
1125+
1126 #include <QtQuick/private/qquickitem_p.h>
1127
1128-#include "damper_p.h"
1129+#include <UbuntuGestures/private/damper_p.h>
1130
1131 UG_NAMESPACE_BEGIN
1132
1133@@ -175,4 +175,4 @@
1134
1135 UG_NAMESPACE_END
1136
1137-#endif // UCSWIPEAREAPRIVATE_H
1138+#endif // UCSWIPEAREA_P_P_H
1139
1140=== modified file 'src/UbuntuGestures/unownedtouchevent.cpp'
1141--- src/Ubuntu/UbuntuGestures/unownedtouchevent.cpp 2016-07-06 11:27:11 +0000
1142+++ src/UbuntuGestures/unownedtouchevent.cpp 2016-09-27 15:29:21 +0000
1143@@ -14,7 +14,7 @@
1144 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1145 */
1146
1147-#include <UbuntuGestures/private/unownedtouchevent_p.h>
1148+#include "unownedtouchevent_p.h"
1149
1150 UG_NAMESPACE_BEGIN
1151
1152
1153=== modified file 'src/UbuntuGestures/unownedtouchevent_p.h'
1154--- src/Ubuntu/UbuntuGestures/unownedtouchevent_p.h 2016-08-09 07:12:07 +0000
1155+++ src/UbuntuGestures/unownedtouchevent_p.h 2016-09-27 15:29:21 +0000
1156@@ -14,12 +14,13 @@
1157 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1158 */
1159
1160-#ifndef UBUNTU_UNOWNEDTOUCHEVENT_H
1161-#define UBUNTU_UNOWNEDTOUCHEVENT_H
1162-
1163-#include <QTouchEvent>
1164-#include <QScopedPointer>
1165-#include "ubuntugesturesglobal.h"
1166+#ifndef UNOWNEDTOUCHEVENT_P_H
1167+#define UNOWNEDTOUCHEVENT_P_H
1168+
1169+#include <QtCore/QScopedPointer>
1170+#include <QtGui/QTouchEvent>
1171+
1172+#include <UbuntuGestures/ubuntugesturesglobal.h>
1173
1174 UG_NAMESPACE_BEGIN
1175 /*
1176@@ -45,4 +46,4 @@
1177
1178 UG_NAMESPACE_END
1179
1180-#endif // UBUNTU_UNOWNEDTOUCHEVENT_H
1181+#endif // UNOWNEDTOUCHEVENT_P_H
1182
1183=== renamed directory 'src/Ubuntu/UbuntuMetrics' => 'src/UbuntuMetrics'
1184=== modified file 'src/UbuntuMetrics/UbuntuMetrics.pro'
1185--- src/Ubuntu/UbuntuMetrics/UbuntuMetrics.pro 2016-08-04 22:54:21 +0000
1186+++ src/UbuntuMetrics/UbuntuMetrics.pro 2016-09-27 15:29:21 +0000
1187@@ -1,7 +1,5 @@
1188-TEMPLATE=lib
1189-TARGET=UbuntuMetrics
1190-QT += core-private gui-private quick-private
1191-CONFIG += dll no_keywords c++11
1192+TARGET = UbuntuMetrics
1193+QT = core-private gui-private quick-private
1194 LIBS += -ldl
1195
1196 contains(QT_CONFIG, opengles2) {
1197@@ -9,33 +7,33 @@
1198 DEFINES += MESA_EGL_NO_X11_HEADERS
1199 }
1200
1201-DEFINES += LTTNG_PLUGIN_INSTALL_PATH=\\\"$$[QT_INSTALL_PLUGINS]/ubuntu/metrics/libumlttng.so\\\"
1202-DEFINES += LTTNG_PLUGIN_BUILD_PATH=\\\"$$OUT_PWD/lttng/libumlttng.so\\\"
1203-
1204-load(qt_build_config)
1205-load(ubuntu_qt_module)
1206-
1207-PUBLIC_HEADERS = \
1208- $$PWD/ubuntumetricsglobal.h \
1209- $$PWD/events.h \
1210- $$PWD/logger.h \
1211- $$PWD/applicationmonitor.h
1212+linux {
1213+ DEFINES += \
1214+ LTTNG_PLUGIN_INSTALL_PATH=\\\"$$[QT_INSTALL_PLUGINS]/ubuntu/metrics/libumlttng.so\\\"
1215+ DEFINES += LTTNG_PLUGIN_BUILD_PATH=\\\"$$OUT_PWD/lttng/libumlttng.so\\\"
1216+}
1217
1218 HEADERS += \
1219- $${PUBLIC_HEADERS} \
1220- $$PWD/ubuntumetricsglobal_p.h \
1221+ $$PWD/applicationmonitor.h \
1222+ $$PWD/applicationmonitor_p.h \
1223+ $$PWD/bitmaptext_p.h \
1224 $$PWD/bitmaptextfont_p.h \
1225+ $$PWD/events.h \
1226 $$PWD/events_p.h \
1227+ $$PWD/gputimer_p.h \
1228+ $$PWD/logger.h \
1229 $$PWD/logger_p.h \
1230- $$PWD/gputimer_p.h \
1231- $$PWD/bitmaptext_p.h \
1232 $$PWD/overlay_p.h \
1233- $$PWD/applicationmonitor_p.h
1234+ $$PWD/ubuntumetricsglobal.h \
1235+ $$PWD/ubuntumetricsglobal_p.h \
1236
1237 SOURCES += \
1238+ $$PWD/applicationmonitor.cpp \
1239+ $$PWD/bitmaptext.cpp \
1240 $$PWD/events.cpp \
1241+ $$PWD/gputimer.cpp \
1242 $$PWD/logger.cpp \
1243- $$PWD/gputimer.cpp \
1244- $$PWD/bitmaptext.cpp \
1245 $$PWD/overlay.cpp \
1246- $$PWD/applicationmonitor.cpp
1247+ $$PWD/ubuntumetricsglobal.cpp
1248+
1249+load(ubuntu_qt_module)
1250
1251=== modified file 'src/UbuntuMetrics/applicationmonitor.cpp'
1252--- src/Ubuntu/UbuntuMetrics/applicationmonitor.cpp 2016-08-22 06:18:26 +0000
1253+++ src/UbuntuMetrics/applicationmonitor.cpp 2016-09-27 15:29:21 +0000
1254@@ -16,6 +16,7 @@
1255 // along with Ubuntu UI Toolkit. If not, see <http://www.gnu.org/licenses/>.
1256
1257 #include "applicationmonitor_p.h"
1258+
1259 #include <QtCore/QTimer>
1260 #include <QtGui/QGuiApplication>
1261 #include <QtQuick/QQuickWindow>
1262@@ -35,10 +36,10 @@
1263 , m_flags(0)
1264 {
1265 m_queue = static_cast<UMEvent*>(
1266- aligned_alloc(logQueueAlignment, logQueueSize * sizeof(UMEvent)));
1267+ alignedAlloc(logQueueAlignment, logQueueSize * sizeof(UMEvent)));
1268
1269 #if !defined(QT_NO_DEBUG)
1270- setObjectName(QString::fromLatin1("UbuntuMetrics logging", 21)); // Thread name.
1271+ setObjectName(QStringLiteral("UbuntuMetrics logging")); // Thread name.
1272 #endif
1273 start();
1274 }
1275
1276=== modified file 'src/UbuntuMetrics/applicationmonitor.h'
1277--- src/Ubuntu/UbuntuMetrics/applicationmonitor.h 2016-08-05 00:11:54 +0000
1278+++ src/UbuntuMetrics/applicationmonitor.h 2016-09-27 15:29:21 +0000
1279@@ -18,10 +18,11 @@
1280 #ifndef APPLICATIONMONITOR_H
1281 #define APPLICATIONMONITOR_H
1282
1283-#include <UbuntuMetrics/ubuntumetricsglobal.h>
1284+#include <QtCore/QList>
1285+
1286 #include <UbuntuMetrics/logger.h>
1287 #include <UbuntuMetrics/events.h>
1288-#include <QtCore/QList>
1289+#include <UbuntuMetrics/ubuntumetricsglobal.h>
1290
1291 class UMApplicationMonitorPrivate;
1292
1293@@ -114,12 +115,12 @@
1294
1295 UMApplicationMonitor();
1296 ~UMApplicationMonitor();
1297- Q_DISABLE_COPY(UMApplicationMonitor);
1298+ Q_DISABLE_COPY(UMApplicationMonitor)
1299
1300 bool eventFilter(QObject* object, QEvent* event) Q_DECL_OVERRIDE;
1301
1302 UMApplicationMonitorPrivate* const d_ptr;
1303- Q_DECLARE_PRIVATE(UMApplicationMonitor);
1304+ Q_DECLARE_PRIVATE(UMApplicationMonitor)
1305 };
1306
1307 #endif // APPLICATIONMONITOR_H
1308
1309=== modified file 'src/UbuntuMetrics/applicationmonitor_p.h'
1310--- src/Ubuntu/UbuntuMetrics/applicationmonitor_p.h 2016-08-05 15:07:39 +0000
1311+++ src/UbuntuMetrics/applicationmonitor_p.h 2016-09-27 15:29:21 +0000
1312@@ -18,10 +18,8 @@
1313 #ifndef APPLICATIONMONITOR_P_H
1314 #define APPLICATIONMONITOR_P_H
1315
1316-#include "applicationmonitor.h"
1317-#include "overlay_p.h"
1318-#include "gputimer_p.h"
1319-#include "ubuntumetricsglobal_p.h"
1320+#include <UbuntuMetrics/applicationmonitor.h>
1321+
1322 #include <QtCore/QTimer>
1323 #include <QtCore/QThread>
1324 #include <QtCore/QMutex>
1325@@ -30,6 +28,10 @@
1326 #include <QtCore/QRunnable>
1327 #include <QtCore/QAtomicInteger>
1328
1329+#include <UbuntuMetrics/private/overlay_p.h>
1330+#include <UbuntuMetrics/private/gputimer_p.h>
1331+#include <UbuntuMetrics/private/ubuntumetricsglobal_p.h>
1332+
1333 class LoggingThread;
1334 class WindowMonitor;
1335 class QQuickWindow;
1336
1337=== modified file 'src/UbuntuMetrics/bitmaptext.cpp'
1338--- src/Ubuntu/UbuntuMetrics/bitmaptext.cpp 2016-08-19 03:35:49 +0000
1339+++ src/UbuntuMetrics/bitmaptext.cpp 2016-09-27 15:29:21 +0000
1340@@ -16,12 +16,14 @@
1341 // along with Ubuntu UI Toolkit. If not, see <http://www.gnu.org/licenses/>.
1342
1343 #include <math.h>
1344+
1345+#include <QtCore/QtGlobal>
1346+#include <QtCore/QPoint>
1347+#include <QtCore/QSize>
1348+
1349 #include "bitmaptext_p.h"
1350 #include "bitmaptextfont_p.h"
1351 #include "ubuntumetricsglobal_p.h"
1352-#include <QtCore/QtGlobal>
1353-#include <QtCore/QSize>
1354-#include <QtCore/QPoint>
1355
1356 static const GLchar* bitmapTextVertexShaderSource =
1357 #if !defined(QT_OPENGL_ES_2)
1358
1359=== modified file 'src/UbuntuMetrics/bitmaptext_p.h'
1360--- src/Ubuntu/UbuntuMetrics/bitmaptext_p.h 2016-08-05 15:07:39 +0000
1361+++ src/UbuntuMetrics/bitmaptext_p.h 2016-09-27 15:29:21 +0000
1362@@ -18,9 +18,10 @@
1363 #ifndef BITMAPTEXT_P_H
1364 #define BITMAPTEXT_P_H
1365
1366-#include "ubuntumetricsglobal_p.h"
1367 #include <QtGui/QOpenGLFunctions>
1368
1369+#include <UbuntuMetrics/private/ubuntumetricsglobal_p.h>
1370+
1371 // BitmapText renders a monospaced bitmap Latin-1 encoded text (128 characters)
1372 // stored in a single texture atlas using OpenGL. The font is generated by
1373 // bitmap-text-builder and stored in the bitmaptextfont_p.h header.
1374
1375=== modified file 'src/UbuntuMetrics/events.cpp'
1376--- src/Ubuntu/UbuntuMetrics/events.cpp 2016-08-18 17:42:55 +0000
1377+++ src/UbuntuMetrics/events.cpp 2016-09-27 15:29:21 +0000
1378@@ -16,13 +16,16 @@
1379 // along with Ubuntu UI Toolkit. If not, see <http://www.gnu.org/licenses/>.
1380
1381 #include "events_p.h"
1382-#include "ubuntumetricsglobal_p.h"
1383-#include <QtCore/QElapsedTimer>
1384+
1385 #include <string.h>
1386 #include <unistd.h>
1387 #include <fcntl.h>
1388 #include <cstdio>
1389
1390+#include <QtCore/QElapsedTimer>
1391+
1392+#include "ubuntumetricsglobal_p.h"
1393+
1394 const int bufferSize = 128;
1395 const int bufferAlignment = 64;
1396
1397@@ -34,9 +37,9 @@
1398 EventUtilsPrivate::EventUtilsPrivate()
1399 {
1400 #if !defined(QT_NO_DEBUG)
1401- ASSERT(m_buffer = static_cast<char*>(aligned_alloc(bufferAlignment, bufferSize)));
1402+ ASSERT(m_buffer = static_cast<char*>(alignedAlloc(bufferAlignment, bufferSize)));
1403 #else
1404- m_buffer = static_cast<char*>(aligned_alloc(bufferAlignment, bufferSize));
1405+ m_buffer = static_cast<char*>(alignedAlloc(bufferAlignment, bufferSize));
1406 #endif
1407 m_cpuTimer.start();
1408 m_cpuTicks = times(&m_cpuTimes);
1409@@ -126,9 +129,9 @@
1410 unsigned long vsize;
1411 long threadCount, rss;
1412 #if !defined(QT_NO_DEBUG)
1413- int value = sscanf(&m_buffer[entryIndices[numThreadsEntry-1]], "%ld", &threadCount);
1414+ int value = std::sscanf(&m_buffer[entryIndices[numThreadsEntry-1]], "%ld", &threadCount);
1415 ASSERT(value == 1);
1416- value = sscanf(&m_buffer[entryIndices[vsizeEntry-1]], "%lu %ld", &vsize, &rss);
1417+ value = std::sscanf(&m_buffer[entryIndices[vsizeEntry-1]], "%lu %ld", &vsize, &rss);
1418 ASSERT(value == 2);
1419 #else
1420 std::sscanf(&m_buffer[entryIndices[numThreadsEntry-1]], "%ld", &threadCount);
1421
1422=== modified file 'src/UbuntuMetrics/events.h'
1423--- src/Ubuntu/UbuntuMetrics/events.h 2016-07-27 17:41:59 +0000
1424+++ src/UbuntuMetrics/events.h 2016-09-27 15:29:21 +0000
1425@@ -155,7 +155,7 @@
1426
1427 private:
1428 EventUtilsPrivate* const d_ptr;
1429- Q_DECLARE_PRIVATE(EventUtils);
1430+ Q_DECLARE_PRIVATE(EventUtils)
1431 };
1432
1433 #endif // EVENTS_H
1434
1435=== modified file 'src/UbuntuMetrics/events_p.h'
1436--- src/Ubuntu/UbuntuMetrics/events_p.h 2016-08-05 15:07:39 +0000
1437+++ src/UbuntuMetrics/events_p.h 2016-09-27 15:29:21 +0000
1438@@ -18,10 +18,13 @@
1439 #ifndef EVENTS_P_H
1440 #define EVENTS_P_H
1441
1442-#include "events.h"
1443-#include "ubuntumetricsglobal_p.h"
1444+#include <UbuntuMetrics/events.h>
1445+
1446+#include <sys/times.h>
1447+
1448 #include <QtCore/QElapsedTimer>
1449-#include <sys/times.h>
1450+
1451+#include <UbuntuMetrics/private/ubuntumetricsglobal_p.h>
1452
1453 class UBUNTU_METRICS_PRIVATE_EXPORT EventUtilsPrivate
1454 {
1455
1456=== modified file 'src/UbuntuMetrics/gputimer.cpp'
1457--- src/Ubuntu/UbuntuMetrics/gputimer.cpp 2016-07-26 13:41:18 +0000
1458+++ src/UbuntuMetrics/gputimer.cpp 2016-09-27 15:29:21 +0000
1459@@ -16,8 +16,10 @@
1460 // along with Ubuntu UI Toolkit. If not, see <http://www.gnu.org/licenses/>.
1461
1462 #include "gputimer_p.h"
1463+
1464+#include <QtCore/QElapsedTimer>
1465+
1466 #include "ubuntumetricsglobal_p.h"
1467-#include <QtCore/QElapsedTimer>
1468
1469 #if !defined(QT_OPENGL_ES) && !defined(GL_TIME_ELAPSED)
1470 #define GL_TIME_ELAPSED 0x88BF // For GL_EXT_timer_query.
1471
1472=== modified file 'src/UbuntuMetrics/gputimer_p.h'
1473--- src/Ubuntu/UbuntuMetrics/gputimer_p.h 2016-08-05 15:07:39 +0000
1474+++ src/UbuntuMetrics/gputimer_p.h 2016-09-27 15:29:21 +0000
1475@@ -18,13 +18,15 @@
1476 #ifndef GPUTIMER_P_H
1477 #define GPUTIMER_P_H
1478
1479-#include "ubuntumetricsglobal_p.h"
1480 #include <QtGui/QOpenGLFunctions>
1481+
1482 #if defined(QT_OPENGL_ES)
1483 #include <EGL/egl.h>
1484 #include <EGL/eglext.h>
1485 #endif
1486
1487+#include <UbuntuMetrics/private/ubuntumetricsglobal_p.h>
1488+
1489 // GPUTimer is used to measure the amount of time taken by the GPU to fully
1490 // complete a set of graphics commands. As opposed to a basic timer which would
1491 // determine the time taken by the graphics driver to push the graphics commands
1492
1493=== modified file 'src/UbuntuMetrics/logger.cpp'
1494--- src/Ubuntu/UbuntuMetrics/logger.cpp 2016-08-06 00:54:30 +0000
1495+++ src/UbuntuMetrics/logger.cpp 2016-09-27 15:29:21 +0000
1496@@ -16,16 +16,19 @@
1497 // along with Ubuntu UI Toolkit. If not, see <http://www.gnu.org/licenses/>.
1498
1499 #include "logger_p.h"
1500-#include "ubuntumetricsglobal_p.h"
1501-#include "events.h"
1502+
1503+#include <dlfcn.h>
1504+
1505 #include <QtCore/QDir>
1506 #include <QtCore/QTime>
1507
1508-// LTTng shared object runtime loading.
1509-#include <dlfcn.h>
1510+#include "events.h"
1511+#include "ubuntumetricsglobal_p.h"
1512+#if defined(Q_OS_LINUX)
1513 #define TRACEPOINT_DEFINE
1514 #define TRACEPOINT_PROBE_DYNAMIC_LINKAGE
1515 #include "lttng/lttng_p.h"
1516+#endif // defined(Q_OS_LINUX)
1517
1518 UMFileLogger::UMFileLogger(const QString& fileName, bool parsable)
1519 : d_ptr(new UMFileLoggerPrivate(fileName, parsable))
1520@@ -112,8 +115,8 @@
1521
1522 QTime timeStamp = QTime(0, 0).addMSecs(event.timeStamp / 1000000);
1523 QString timeString = !timeStamp.hour()
1524- ? timeStamp.toString(QString::fromLatin1("mm:ss:zzz", 9))
1525- : timeStamp.toString(QString::fromLatin1("hh:mm:ss:zzz", 12));
1526+ ? timeStamp.toString(QStringLiteral("mm:ss:zzz"))
1527+ : timeStamp.toString(QStringLiteral("hh:mm:ss:zzz"));
1528
1529 switch (event.type) {
1530 case UMEvent::Process: {
1531@@ -228,6 +231,8 @@
1532 return !!(d_func()->m_flags & UMFileLoggerPrivate::Parsable);
1533 }
1534
1535+#if defined(Q_OS_LINUX)
1536+
1537 UMLTTNGPlugin* UMLTTNGLogger::m_plugin = nullptr;
1538 bool UMLTTNGLogger::m_error = false;
1539
1540@@ -317,3 +322,5 @@
1541 }
1542 }
1543 }
1544+
1545+#endif // defined(Q_OS_LINUX)
1546
1547=== modified file 'src/UbuntuMetrics/logger.h'
1548--- src/Ubuntu/UbuntuMetrics/logger.h 2016-08-04 22:54:21 +0000
1549+++ src/UbuntuMetrics/logger.h 2016-09-27 15:29:21 +0000
1550@@ -18,12 +18,13 @@
1551 #ifndef LOGGER_H
1552 #define LOGGER_H
1553
1554+#include <QtCore/QFile>
1555+
1556 #include <UbuntuMetrics/ubuntumetricsglobal.h>
1557-#include <QtCore/QFile>
1558
1559-class UMEvent;
1560 class UMFileLoggerPrivate;
1561 struct UMLTTNGPlugin;
1562+struct UMEvent;
1563
1564 // Log events to a specific device.
1565 class UBUNTU_METRICS_EXPORT UMLogger
1566@@ -54,9 +55,11 @@
1567
1568 private:
1569 UMFileLoggerPrivate* const d_ptr;
1570- Q_DECLARE_PRIVATE(UMFileLogger);
1571+ Q_DECLARE_PRIVATE(UMFileLogger)
1572 };
1573
1574+#if defined(Q_OS_LINUX)
1575+
1576 // Log events to LTTng.
1577 class UBUNTU_METRICS_EXPORT UMLTTNGLogger : public UMLogger
1578 {
1579@@ -69,7 +72,9 @@
1580 static UMLTTNGPlugin* m_plugin;
1581 static bool m_error;
1582
1583- void* __reserved;
1584+ Q_DECL_UNUSED_MEMBER void* __reserved;
1585 };
1586
1587+#endif // defined(Q_OS_LINUX)
1588+
1589 #endif // LOGGER_H
1590
1591=== modified file 'src/UbuntuMetrics/logger_p.h'
1592--- src/Ubuntu/UbuntuMetrics/logger_p.h 2016-08-05 15:07:39 +0000
1593+++ src/UbuntuMetrics/logger_p.h 2016-09-27 15:29:21 +0000
1594@@ -18,12 +18,14 @@
1595 #ifndef LOGGER_P_H
1596 #define LOGGER_P_H
1597
1598-#include "logger.h"
1599-#include "ubuntumetricsglobal_p.h"
1600-#include "events.h"
1601+#include <UbuntuMetrics/logger.h>
1602+
1603 #include <QtCore/QFile>
1604 #include <QtCore/QTextStream>
1605
1606+#include <UbuntuMetrics/events.h>
1607+#include <UbuntuMetrics/private/ubuntumetricsglobal_p.h>
1608+
1609 class UBUNTU_METRICS_PRIVATE_EXPORT UMFileLoggerPrivate
1610 {
1611 public:
1612
1613=== modified file 'src/UbuntuMetrics/overlay.cpp'
1614--- src/Ubuntu/UbuntuMetrics/overlay.cpp 2016-07-26 13:41:18 +0000
1615+++ src/UbuntuMetrics/overlay.cpp 2016-09-27 15:29:21 +0000
1616@@ -16,11 +16,14 @@
1617 // along with Ubuntu UI Toolkit. If not, see <http://www.gnu.org/licenses/>.
1618
1619 #include "overlay_p.h"
1620-#include "ubuntumetricsglobal_p.h"
1621+
1622+#include <unistd.h>
1623+#include <fcntl.h>
1624+
1625 #include <QtCore/QSysInfo>
1626 #include <QtGui/QGuiApplication>
1627-#include <unistd.h>
1628-#include <fcntl.h>
1629+
1630+#include "ubuntumetricsglobal_p.h"
1631
1632 static const QPointF position = QPointF(5.0f, 5.0f);
1633 static const float opacity = 0.85f;
1634@@ -93,7 +96,7 @@
1635 {
1636 DASSERT(text);
1637
1638- m_buffer = aligned_alloc(bufferAlignment, bufferSize);
1639+ m_buffer = alignedAlloc(bufferAlignment, bufferSize);
1640 memset(&m_processEvent, 0, sizeof(m_processEvent));
1641 m_processEvent.type = UMEvent::Process;
1642 }
1643
1644=== modified file 'src/UbuntuMetrics/overlay_p.h'
1645--- src/Ubuntu/UbuntuMetrics/overlay_p.h 2016-08-05 15:07:39 +0000
1646+++ src/UbuntuMetrics/overlay_p.h 2016-09-27 15:29:21 +0000
1647@@ -18,11 +18,12 @@
1648 #ifndef OVERLAY_P_H
1649 #define OVERLAY_P_H
1650
1651-#include "ubuntumetricsglobal_p.h"
1652-#include "bitmaptext_p.h"
1653-#include "events.h"
1654 #include <QtCore/QSize>
1655
1656+#include <UbuntuMetrics/events.h>
1657+#include <UbuntuMetrics/private/bitmaptext_p.h>
1658+#include <UbuntuMetrics/private/ubuntumetricsglobal_p.h>
1659+
1660 #if !defined QT_NO_DEBUG
1661 class QOpenGLContext;
1662 #endif
1663
1664=== added file 'src/UbuntuMetrics/ubuntumetricsglobal.cpp'
1665--- src/UbuntuMetrics/ubuntumetricsglobal.cpp 1970-01-01 00:00:00 +0000
1666+++ src/UbuntuMetrics/ubuntumetricsglobal.cpp 2016-09-27 15:29:21 +0000
1667@@ -0,0 +1,34 @@
1668+// Copyright © 2016 Canonical Ltd.
1669+// Author: Loïc Molinari <loic.molinari@canonical.com>
1670+//
1671+// This file is part of Ubuntu UI Toolkit.
1672+//
1673+// Ubuntu UI Toolkit is free software: you can redistribute it and/or modify it
1674+// under the terms of the GNU Lesser General Public License as published by the
1675+// Free Software Foundation; version 3.
1676+//
1677+// Ubuntu UI Toolkit is distributed in the hope that it will be useful, but
1678+// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1679+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
1680+// for more details.
1681+//
1682+// You should have received a copy of the GNU Lesser General Public License
1683+// along with Ubuntu UI Toolkit. If not, see <http://www.gnu.org/licenses/>.
1684+
1685+#include "ubuntumetricsglobal_p.h"
1686+
1687+void* alignedAlloc(size_t alignment, size_t size)
1688+{
1689+ DASSERT(IS_POWER_OF_TWO(alignment));
1690+ // DASSERT(((size % alignment) == 0)); // FIXME(loicm) ASSERT doesn't support '%'...
1691+
1692+#if defined(__APPLE__)
1693+ void* pointer;
1694+ posix_memalign(&pointer, alignment, size);
1695+ return pointer;
1696+#elif defined(_WIN32)
1697+ return _aligned_malloc(size, alignment);
1698+#else
1699+ return aligned_alloc(alignment, size);
1700+#endif
1701+}
1702
1703=== modified file 'src/UbuntuMetrics/ubuntumetricsglobal.h'
1704--- src/Ubuntu/UbuntuMetrics/ubuntumetricsglobal.h 2016-07-22 10:47:24 +0000
1705+++ src/UbuntuMetrics/ubuntumetricsglobal.h 2016-09-27 15:29:21 +0000
1706@@ -18,7 +18,7 @@
1707 #ifndef UBUNTUMETRICSGLOBAL_H
1708 #define UBUNTUMETRICSGLOBAL_H
1709
1710-#include <QtCore/qglobal.h>
1711+#include <QtCore/QtGlobal>
1712
1713 #if defined(QT_BUILD_UBUNTUMETRICS_LIB)
1714 #define UBUNTU_METRICS_EXPORT Q_DECL_EXPORT
1715
1716=== modified file 'src/UbuntuMetrics/ubuntumetricsglobal_p.h'
1717--- src/Ubuntu/UbuntuMetrics/ubuntumetricsglobal_p.h 2016-08-04 16:50:30 +0000
1718+++ src/UbuntuMetrics/ubuntumetricsglobal_p.h 2016-09-27 15:29:21 +0000
1719@@ -18,7 +18,7 @@
1720 #ifndef UBUNTUMETRICSGLOBAL_P_H
1721 #define UBUNTUMETRICSGLOBAL_P_H
1722
1723-#include "ubuntumetricsglobal.h"
1724+#include <UbuntuMetrics/ubuntumetricsglobal.h>
1725
1726 // Logging macros, debug macros are compiled out for release builds.
1727 #define LOG(...) qDebug(__VA_ARGS__)
1728@@ -51,4 +51,8 @@
1729
1730 #define UBUNTU_METRICS_PRIVATE_EXPORT UBUNTU_METRICS_EXPORT
1731
1732+// Allocates size bytes and returns an pointer to the aligned memory. alignment
1733+// must be a power-of-two and size a multiple of alignment.
1734+void* alignedAlloc(size_t alignment, size_t size);
1735+
1736 #endif // UBUNTUMETRICSGLOBAL_P_H
1737
1738=== renamed directory 'src/Ubuntu/UbuntuToolkit' => 'src/UbuntuToolkit'
1739=== modified file 'src/UbuntuToolkit/UbuntuToolkit.pro'
1740--- src/Ubuntu/UbuntuToolkit/UbuntuToolkit.pro 2016-08-26 12:03:35 +0000
1741+++ src/UbuntuToolkit/UbuntuToolkit.pro 2016-09-27 15:29:21 +0000
1742@@ -1,255 +1,229 @@
1743-TEMPLATE=lib
1744-TARGET=UbuntuToolkit
1745-
1746-QT *= core-private gui-private qml qml-private quick quick-private testlib
1747+TARGET = UbuntuToolkit
1748+QT = core-private gui-private qml-private quick-private testlib dbus svg organizer \
1749+ UbuntuGestures-private UbuntuMetrics
1750
1751 unix {
1752 CONFIG += link_pkgconfig
1753 PKGCONFIG += gio-2.0 dbus-1 libnih libnih-dbus
1754 }
1755-QT *= dbus svg UbuntuGestures UbuntuGestures_private UbuntuMetrics
1756-
1757-# QOrganizer for Alarm API
1758-QT *= organizer
1759
1760 !contains(QT_ARCH, arm) {
1761 DEFINES += UBUNTUTOOLKIT_ENABLE_X11_TOUCH_EMULATION
1762 LIBS += -lX11 -lxcb -lXi
1763-
1764 SOURCES += mousetouchadaptor_x11.cpp
1765 }
1766
1767-CONFIG += dll no_keywords c++11
1768-
1769-INCLUDEPATH+=$$PWD
1770-
1771-DEFINES += UBUNTUTOOLKIT_LIBRARY
1772-#comment in the following line to disable traces
1773-#DEFINES += QT_NO_DEBUG_OUTPUT
1774-DEFINES += QT_USE_QSTRINGBUILDER
1775-
1776-load(qt_build_config)
1777-load(ubuntu_qt_module)
1778-
1779-QMAKE_CXXFLAGS -= -Werror=deprecated-declarations
1780-DEFINES -= QT_DEPRECATED_WARNINGS
1781-DEFINES -= QT_ASCII_CAST_WARNINGS
1782-
1783-HEADERS += \
1784- colorutils_p.h \
1785- ubuntutoolkitglobal.h \
1786- tree_p.h \
1787- asyncloader_p.h \
1788- asyncloader_p_p.h \
1789- mousetouchadaptor_p.h \
1790- mousetouchadaptor_p_p.h \
1791- propertychange_p.h \
1792- ubuntutoolkitmodule.h \
1793- splitview_p.h \
1794- splitview_p_p.h \
1795- privates/splitviewhandler_p_p.h \
1796- menu_p_p.h \
1797- menubar_p_p.h \
1798- menu_p.h \
1799- menubar_p.h \
1800- menugroup_p.h
1801-
1802-SOURCES += \
1803- colorutils.cpp \
1804- tree.cpp \
1805- asyncloader.cpp \
1806- mousetouchadaptor.cpp \
1807- propertychange.cpp \
1808- ubuntutoolkitmodule.cpp \
1809- splitview.cpp \
1810- privates/splitviewhandler.cpp \
1811- splitviewlayout.cpp \
1812- menu.cpp \
1813- menubar.cpp \
1814- menugroup.cpp
1815-
1816-HEADERS += \
1817- uctheme_p.h \
1818- i18n_p.h \
1819- listener_p.h \
1820- ucscalingimageprovider_p.h \
1821- ucunits_p.h \
1822- ucqquickimageextension_p.h \
1823- quickutils_p.h \
1824- ucubuntushapetextures_p.h \
1825- ucubuntushape_p.h \
1826- ucubuntushapeoverlay_p.h \
1827- ucproportionalshape_p.h \
1828- inversemouseareatype_p.h \
1829- qquickclipboard_p.h \
1830- qquickmimedata_p.h \
1831- qquickclipboard_p_p.h \
1832- ucubuntuanimation_p.h \
1833- ucfontutils_p.h \
1834- ucapplication_p.h \
1835- ucarguments_p.h \
1836- ucargument_p.h \
1837- ucalarm_p.h \
1838- ucalarm_p_p.h \
1839- alarmmanager_p_p.h \
1840- alarmmanager_p.h \
1841- ucalarmmodel_p.h \
1842- unitythemeiconprovider_p.h \
1843- adapters/alarmsadapter_p.h \
1844- ucstatesaver_p.h \
1845- sortbehavior_p.h \
1846- filterbehavior_p.h \
1847- sortfiltermodel_p.h \
1848- statesaverbackend_p.h \
1849- ucstatesaver_p_p.h \
1850- ucurihandler_p.h \
1851- ucinversemouse_p.h \
1852- ucmouse_p.h \
1853- unixsignalhandler_p.h \
1854- ucstyleditembase_p.h \
1855- ucstyleditembase_p_p.h \
1856- ucaction_p.h \
1857- ucactioncontext_p.h \
1858- ucactionmanager_p.h \
1859- adapters/actionsproxy_p.h \
1860- adapters/dbuspropertywatcher_p.h \
1861- uclistitem_p.h \
1862- uclistitem_p_p.h \
1863- uclistitemactions_p.h \
1864- uclistitemactions_p_p.h \
1865- uclistitemstyle_p.h \
1866- ucserviceproperties_p.h \
1867- ucserviceproperties_p_p.h \
1868- privates/listitemdragarea_p.h \
1869- privates/listitemdraghandler_p.h \
1870- privates/listitemselection_p.h \
1871- ucdeprecatedtheme_p.h \
1872- ucdefaulttheme_p.h \
1873- ucstylehints_p.h \
1874- ucslotslayout_p.h \
1875- ucslotslayout_p_p.h \
1876- livetimer_p.h \
1877- livetimer_p_p.h \
1878- timeutils_p.h \
1879- ucactionitem_p.h \
1880- ucactionitem_p_p.h \
1881- uchaptics_p.h \
1882- ucabstractbutton_p.h \
1883- ucabstractbutton_p_p.h \
1884- ucmargins_p.h \
1885- ucthemingextension_p.h \
1886- ucheader_p.h \
1887- uclabel_p.h \
1888- uclistitemlayout_p.h \
1889- privates/threelabelsslot_p.h \
1890- ucimportversionchecker_p.h \
1891- ucbottomedgehint_p.h \
1892- ucbottomedgehint_p_p.h \
1893- ucmathutils_p.h \
1894- ucbottomedge_p.h \
1895- ucbottomedge_p_p.h \
1896- ucbottomedgestyle_p.h \
1897- ucbottomedgeregion_p.h \
1898- ucpagetreenode_p.h \
1899- ucpagetreenode_p_p.h \
1900- ucmainviewbase_p.h \
1901- ucmainviewbase_p_p.h \
1902- ucperformancemonitor_p.h \
1903- privates/listviewextensions_p.h \
1904- privates/frame_p.h \
1905- privates/ucpagewrapper_p.h \
1906- privates/ucpagewrapper_p_p.h \
1907- privates/ucpagewrapperincubator_p.h \
1908- privates/appheaderbase_p.h \
1909- label_p.h \
1910- ucbottomedgeregion_p_p.h \
1911- privates/ucscrollbarutils_p.h \
1912- actionlist_p.h \
1913- exclusivegroup_p.h
1914+# Uncomment to compile out qDebug() calls.
1915+# DEFINES += QT_NO_DEBUG_OUTPUT
1916+
1917+HEADERS += \
1918+ $$PWD/actionlist_p.h \
1919+ $$PWD/adapters/actionsproxy_p.h \
1920+ $$PWD/adapters/alarmsadapter_p.h \
1921+ $$PWD/adapters/dbuspropertywatcher_p.h \
1922+ $$PWD/alarmmanager_p.h \
1923+ $$PWD/alarmmanager_p_p.h \
1924+ $$PWD/asyncloader_p.h \
1925+ $$PWD/asyncloader_p_p.h \
1926+ $$PWD/colorutils_p.h \
1927+ $$PWD/exclusivegroup_p.h \
1928+ $$PWD/filterbehavior_p.h \
1929+ $$PWD/i18n_p.h \
1930+ $$PWD/inversemouseareatype_p.h \
1931+ $$PWD/label_p.h \
1932+ $$PWD/listener_p.h \
1933+ $$PWD/livetimer_p.h \
1934+ $$PWD/livetimer_p_p.h \
1935+ $$PWD/menu_p.h \
1936+ $$PWD/menu_p_p.h \
1937+ $$PWD/menubar_p.h \
1938+ $$PWD/menubar_p_p.h \
1939+ $$PWD/menugroup_p.h \
1940+ $$PWD/mousetouchadaptor_p.h \
1941+ $$PWD/mousetouchadaptor_p_p.h \
1942+ $$PWD/privates/appheaderbase_p.h \
1943+ $$PWD/privates/frame_p.h \
1944+ $$PWD/privates/listitemdragarea_p.h \
1945+ $$PWD/privates/listitemdraghandler_p.h \
1946+ $$PWD/privates/listitemselection_p.h \
1947+ $$PWD/privates/listviewextensions_p.h \
1948+ $$PWD/privates/splitviewhandler_p.h \
1949+ $$PWD/privates/threelabelsslot_p.h \
1950+ $$PWD/privates/ucpagewrapper_p.h \
1951+ $$PWD/privates/ucpagewrapper_p_p.h \
1952+ $$PWD/privates/ucpagewrapperincubator_p.h \
1953+ $$PWD/privates/ucscrollbarutils_p.h \
1954+ $$PWD/propertychange_p.h \
1955+ $$PWD/qquickclipboard_p.h \
1956+ $$PWD/qquickclipboard_p_p.h \
1957+ $$PWD/qquickmimedata_p.h \
1958+ $$PWD/quickutils_p.h \
1959+ $$PWD/sortbehavior_p.h \
1960+ $$PWD/sortfiltermodel_p.h \
1961+ $$PWD/splitview_p.h \
1962+ $$PWD/splitview_p_p.h \
1963+ $$PWD/statesaverbackend_p.h \
1964+ $$PWD/timeutils_p.h \
1965+ $$PWD/tree_p.h \
1966+ $$PWD/ubuntutoolkitglobal.h \
1967+ $$PWD/ubuntutoolkitmodule.h \
1968+ $$PWD/ucabstractbutton_p.h \
1969+ $$PWD/ucabstractbutton_p_p.h \
1970+ $$PWD/ucaction_p.h \
1971+ $$PWD/ucactioncontext_p.h \
1972+ $$PWD/ucactionitem_p.h \
1973+ $$PWD/ucactionitem_p_p.h \
1974+ $$PWD/ucactionmanager_p.h \
1975+ $$PWD/ucalarm_p.h \
1976+ $$PWD/ucalarm_p_p.h \
1977+ $$PWD/ucalarmmodel_p.h \
1978+ $$PWD/ucapplication_p.h \
1979+ $$PWD/ucargument_p.h \
1980+ $$PWD/ucarguments_p.h \
1981+ $$PWD/ucbottomedge_p.h \
1982+ $$PWD/ucbottomedge_p_p.h \
1983+ $$PWD/ucbottomedgehint_p.h \
1984+ $$PWD/ucbottomedgehint_p_p.h \
1985+ $$PWD/ucbottomedgeregion_p.h \
1986+ $$PWD/ucbottomedgeregion_p_p.h \
1987+ $$PWD/ucbottomedgestyle_p.h \
1988+ $$PWD/ucdefaulttheme_p.h \
1989+ $$PWD/ucdeprecatedtheme_p.h \
1990+ $$PWD/ucfontutils_p.h \
1991+ $$PWD/uchaptics_p.h \
1992+ $$PWD/ucheader_p.h \
1993+ $$PWD/ucimportversionchecker_p.h \
1994+ $$PWD/ucinversemouse_p.h \
1995+ $$PWD/uclabel_p.h \
1996+ $$PWD/uclistitem_p.h \
1997+ $$PWD/uclistitem_p_p.h \
1998+ $$PWD/uclistitemactions_p.h \
1999+ $$PWD/uclistitemactions_p_p.h \
2000+ $$PWD/uclistitemlayout_p.h \
2001+ $$PWD/uclistitemstyle_p.h \
2002+ $$PWD/ucmainviewbase_p.h \
2003+ $$PWD/ucmainviewbase_p_p.h \
2004+ $$PWD/ucmargins_p.h \
2005+ $$PWD/ucmathutils_p.h \
2006+ $$PWD/ucmouse_p.h \
2007+ $$PWD/ucpagetreenode_p.h \
2008+ $$PWD/ucpagetreenode_p_p.h \
2009+ $$PWD/ucperformancemonitor_p.h \
2010+ $$PWD/ucproportionalshape_p.h \
2011+ $$PWD/ucqquickimageextension_p.h \
2012+ $$PWD/ucscalingimageprovider_p.h \
2013+ $$PWD/ucserviceproperties_p.h \
2014+ $$PWD/ucserviceproperties_p_p.h \
2015+ $$PWD/ucslotslayout_p.h \
2016+ $$PWD/ucslotslayout_p_p.h \
2017+ $$PWD/ucstatesaver_p.h \
2018+ $$PWD/ucstatesaver_p_p.h \
2019+ $$PWD/ucstyleditembase_p.h \
2020+ $$PWD/ucstyleditembase_p_p.h \
2021+ $$PWD/ucstylehints_p.h \
2022+ $$PWD/uctheme_p.h \
2023+ $$PWD/ucthemingextension_p.h \
2024+ $$PWD/ucubuntuanimation_p.h \
2025+ $$PWD/ucubuntushape_p.h \
2026+ $$PWD/ucubuntushapeoverlay_p.h \
2027+ $$PWD/ucubuntushapetextures_p.h \
2028+ $$PWD/ucunits_p.h \
2029+ $$PWD/ucurihandler_p.h \
2030+ $$PWD/unitythemeiconprovider_p.h \
2031+ $$PWD/unixsignalhandler_p.h
2032
2033 SOURCES += \
2034- uctheme.cpp \
2035- i18n.cpp \
2036- listener.cpp \
2037- ucscalingimageprovider.cpp \
2038- ucunits.cpp \
2039- ucqquickimageextension.cpp \
2040- quickutils.cpp \
2041- ucubuntushapetextures.cpp \
2042- ucubuntushape.cpp \
2043- ucubuntushapeoverlay.cpp \
2044- ucproportionalshape.cpp \
2045- inversemouseareatype.cpp \
2046- qquickclipboard.cpp \
2047- qquickmimedata.cpp \
2048- ucubuntuanimation.cpp \
2049- ucfontutils.cpp \
2050- ucapplication.cpp \
2051- ucarguments.cpp \
2052- ucargument.cpp \
2053- ucalarm.cpp \
2054- alarmmanager_p.cpp \
2055- ucalarmmodel.cpp \
2056- unitythemeiconprovider.cpp \
2057- ucstatesaver.cpp \
2058- sortbehavior.cpp \
2059- filterbehavior.cpp \
2060- sortfiltermodel.cpp \
2061- statesaverbackend_p.cpp \
2062- ucurihandler.cpp \
2063- ucmousefilters.cpp \
2064- unixsignalhandler_p.cpp \
2065- ucstyleditembase.cpp \
2066- ucaction.cpp \
2067- ucactioncontext.cpp \
2068- ucactionmanager.cpp \
2069- adapters/actionsproxy_p.cpp \
2070- adapters/dbuspropertywatcher_p.cpp \
2071- uclistitem.cpp \
2072- uclistitemactions.cpp \
2073- uclistitemstyle.cpp \
2074- ucviewitemsattached.cpp \
2075- ucserviceproperties.cpp \
2076- privates/listitemdragarea.cpp \
2077- privates/listitemdraghandler.cpp \
2078- privates/listitemexpansion.cpp \
2079- privates/listitemselection.cpp \
2080- ucdeprecatedtheme.cpp \
2081- ucdefaulttheme.cpp \
2082- ucstylehints.cpp \
2083- ucslotslayout.cpp \
2084- livetimer.cpp \
2085- livetimer_p.cpp \
2086- ucactionitem.cpp \
2087- uchaptics.cpp \
2088- ucabstractbutton.cpp \
2089- ucthemingextension.cpp \
2090- ucheader.cpp \
2091- uclabel.cpp \
2092- uclistitemlayout.cpp \
2093- privates/threelabelsslot_p.cpp \
2094- ucimportversionchecker_p.cpp \
2095- ucbottomedgehint.cpp \
2096- ucmathutils.cpp \
2097- ucbottomedge.cpp \
2098- ucbottomedgestyle.cpp \
2099- ucbottomedgeregion.cpp \
2100- ucpagetreenode.cpp \
2101- ucmainviewbase.cpp \
2102- ucperformancemonitor.cpp \
2103- privates/listviewextensions.cpp \
2104- privates/frame.cpp \
2105- privates/ucpagewrapper.cpp \
2106- privates/ucpagewrapperincubator.cpp \
2107- privates/appheaderbase.cpp \
2108- privates/ucscrollbarutils.cpp \
2109- actionlist.cpp \
2110- exclusivegroup.cpp
2111-
2112-# adapters
2113-SOURCES += $$PWD/adapters/alarmsadapter_organizer.cpp
2114-
2115-#resources
2116+ $$PWD/actionlist.cpp \
2117+ $$PWD/adapters/actionsproxy_p.cpp \
2118+ $$PWD/adapters/alarmsadapter_organizer.cpp \
2119+ $$PWD/adapters/dbuspropertywatcher_p.cpp \
2120+ $$PWD/alarmmanager_p.cpp \
2121+ $$PWD/asyncloader.cpp \
2122+ $$PWD/colorutils.cpp \
2123+ $$PWD/exclusivegroup.cpp \
2124+ $$PWD/filterbehavior.cpp \
2125+ $$PWD/i18n.cpp \
2126+ $$PWD/inversemouseareatype.cpp \
2127+ $$PWD/listener.cpp \
2128+ $$PWD/livetimer.cpp \
2129+ $$PWD/livetimer_p.cpp \
2130+ $$PWD/menu.cpp \
2131+ $$PWD/menubar.cpp \
2132+ $$PWD/menugroup.cpp \
2133+ $$PWD/mousetouchadaptor.cpp \
2134+ $$PWD/privates/appheaderbase.cpp \
2135+ $$PWD/privates/frame.cpp \
2136+ $$PWD/privates/listitemdragarea.cpp \
2137+ $$PWD/privates/listitemdraghandler.cpp \
2138+ $$PWD/privates/listitemexpansion.cpp \
2139+ $$PWD/privates/listitemselection.cpp \
2140+ $$PWD/privates/listviewextensions.cpp \
2141+ $$PWD/privates/splitviewhandler.cpp \
2142+ $$PWD/privates/threelabelsslot_p.cpp \
2143+ $$PWD/privates/ucpagewrapper.cpp \
2144+ $$PWD/privates/ucpagewrapperincubator.cpp \
2145+ $$PWD/privates/ucscrollbarutils.cpp \
2146+ $$PWD/propertychange.cpp \
2147+ $$PWD/qquickclipboard.cpp \
2148+ $$PWD/qquickmimedata.cpp \
2149+ $$PWD/quickutils.cpp \
2150+ $$PWD/sortbehavior.cpp \
2151+ $$PWD/sortfiltermodel.cpp \
2152+ $$PWD/splitview.cpp \
2153+ $$PWD/splitviewlayout.cpp \
2154+ $$PWD/statesaverbackend_p.cpp \
2155+ $$PWD/tree.cpp \
2156+ $$PWD/ubuntutoolkitmodule.cpp \
2157+ $$PWD/ucabstractbutton.cpp \
2158+ $$PWD/ucaction.cpp \
2159+ $$PWD/ucactioncontext.cpp \
2160+ $$PWD/ucactionitem.cpp \
2161+ $$PWD/ucactionmanager.cpp \
2162+ $$PWD/ucalarm.cpp \
2163+ $$PWD/ucalarmmodel.cpp \
2164+ $$PWD/ucapplication.cpp \
2165+ $$PWD/ucargument.cpp \
2166+ $$PWD/ucarguments.cpp \
2167+ $$PWD/ucbottomedge.cpp \
2168+ $$PWD/ucbottomedgehint.cpp \
2169+ $$PWD/ucbottomedgeregion.cpp \
2170+ $$PWD/ucbottomedgestyle.cpp \
2171+ $$PWD/ucdefaulttheme.cpp \
2172+ $$PWD/ucdeprecatedtheme.cpp \
2173+ $$PWD/ucfontutils.cpp \
2174+ $$PWD/uchaptics.cpp \
2175+ $$PWD/ucheader.cpp \
2176+ $$PWD/ucimportversionchecker_p.cpp \
2177+ $$PWD/uclabel.cpp \
2178+ $$PWD/uclistitem.cpp \
2179+ $$PWD/uclistitemactions.cpp \
2180+ $$PWD/uclistitemlayout.cpp \
2181+ $$PWD/uclistitemstyle.cpp \
2182+ $$PWD/ucmainviewbase.cpp \
2183+ $$PWD/ucmathutils.cpp \
2184+ $$PWD/ucmousefilters.cpp \
2185+ $$PWD/ucpagetreenode.cpp \
2186+ $$PWD/ucperformancemonitor.cpp \
2187+ $$PWD/ucproportionalshape.cpp \
2188+ $$PWD/ucqquickimageextension.cpp \
2189+ $$PWD/ucscalingimageprovider.cpp \
2190+ $$PWD/ucserviceproperties.cpp \
2191+ $$PWD/ucslotslayout.cpp \
2192+ $$PWD/ucstatesaver.cpp \
2193+ $$PWD/ucstyleditembase.cpp \
2194+ $$PWD/ucstylehints.cpp \
2195+ $$PWD/uctheme.cpp \
2196+ $$PWD/ucthemingextension.cpp \
2197+ $$PWD/ucubuntuanimation.cpp \
2198+ $$PWD/ucubuntushape.cpp \
2199+ $$PWD/ucubuntushapeoverlay.cpp \
2200+ $$PWD/ucubuntushapetextures.cpp \
2201+ $$PWD/ucunits.cpp \
2202+ $$PWD/ucurihandler.cpp \
2203+ $$PWD/ucviewitemsattached.cpp \
2204+ $$PWD/unitythemeiconprovider.cpp \
2205+ $$PWD/unixsignalhandler_p.cpp
2206+
2207 RESOURCES += \
2208 $$PWD/resources.qrc
2209
2210@@ -262,3 +236,5 @@
2211 $$PWD/shaders/shapeoverlay_no_dfdy.frag \
2212 $$PWD/privates/shaders/frame.vert \
2213 $$PWD/privates/shaders/frame.frag
2214+
2215+load(ubuntu_qt_module)
2216
2217=== modified file 'src/UbuntuToolkit/actionlist.cpp'
2218--- src/Ubuntu/UbuntuToolkit/actionlist.cpp 2016-09-15 15:10:46 +0000
2219+++ src/UbuntuToolkit/actionlist.cpp 2016-09-27 15:29:21 +0000
2220@@ -15,6 +15,7 @@
2221 */
2222
2223 #include "actionlist_p.h"
2224+
2225 #include "ucaction_p.h"
2226
2227 UT_NAMESPACE_BEGIN
2228
2229=== modified file 'src/UbuntuToolkit/actionlist_p.h'
2230--- src/Ubuntu/UbuntuToolkit/actionlist_p.h 2016-09-15 15:10:46 +0000
2231+++ src/UbuntuToolkit/actionlist_p.h 2016-09-27 15:29:21 +0000
2232@@ -14,12 +14,13 @@
2233 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2234 */
2235
2236-#ifndef ACTIONLIST_H
2237-#define ACTIONLIST_H
2238+#ifndef ACTIONLIST_P_H
2239+#define ACTIONLIST_P_H
2240
2241-#include <QObject>
2242+#include <QtCore/QObject>
2243 #include <QtQml/QQmlListProperty>
2244-#include "ubuntutoolkitglobal.h"
2245+
2246+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
2247
2248 UT_NAMESPACE_BEGIN
2249
2250@@ -58,4 +59,4 @@
2251
2252 UT_NAMESPACE_END
2253
2254-#endif // ACTIONLIST_H
2255+#endif // ACTIONLIST_P_H
2256
2257=== modified file 'src/UbuntuToolkit/adapters/actionsproxy_p.cpp'
2258--- src/Ubuntu/UbuntuToolkit/adapters/actionsproxy_p.cpp 2016-07-07 07:21:48 +0000
2259+++ src/UbuntuToolkit/adapters/actionsproxy_p.cpp 2016-09-27 15:29:21 +0000
2260@@ -14,11 +14,12 @@
2261 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2262 */
2263
2264-#include "actionsproxy_p.h"
2265+#include "adapters/actionsproxy_p.h"
2266+
2267+#include <QtCore/QDebug>
2268+
2269 #include "ucactioncontext_p.h"
2270
2271-#include <QDebug>
2272-
2273 Q_LOGGING_CATEGORY(ucActionProxy, "ubuntu.components.ActionProxy", QtMsgType::QtWarningMsg)
2274
2275 #define AP_TRACE(params) qCDebug(ucActionProxy) << params
2276@@ -29,7 +30,7 @@
2277 : globalContext(new UCActionContext)
2278 {
2279 // for testing purposes
2280- globalContext->setObjectName("GlobalActionContext");
2281+ globalContext->setObjectName(QStringLiteral("GlobalActionContext"));
2282 }
2283 ActionProxy::~ActionProxy()
2284 {
2285
2286=== modified file 'src/UbuntuToolkit/adapters/actionsproxy_p.h'
2287--- src/Ubuntu/UbuntuToolkit/adapters/actionsproxy_p.h 2016-07-07 07:21:48 +0000
2288+++ src/UbuntuToolkit/adapters/actionsproxy_p.h 2016-09-27 15:29:21 +0000
2289@@ -20,7 +20,8 @@
2290 #include <QtCore/QObject>
2291 #include <QtCore/QSet>
2292 #include <QtCore/QPointer>
2293-#include "ucaction_p.h"
2294+
2295+#include <UbuntuToolkit/private/ucaction_p.h>
2296
2297 UT_NAMESPACE_BEGIN
2298
2299
2300=== modified file 'src/UbuntuToolkit/adapters/alarmsadapter_organizer.cpp'
2301--- src/Ubuntu/UbuntuToolkit/adapters/alarmsadapter_organizer.cpp 2016-07-07 07:21:48 +0000
2302+++ src/UbuntuToolkit/adapters/alarmsadapter_organizer.cpp 2016-09-27 15:29:21 +0000
2303@@ -16,11 +16,7 @@
2304 * Author: Zsombor Egri <zsombor.egri@canonical.com>
2305 */
2306
2307-#include "ucalarm_p.h"
2308-#include "ucalarm_p_p.h"
2309-#include "alarmmanager_p_p.h"
2310-#include "alarmsadapter_p.h"
2311-#include <qorganizertodooccurrence.h>
2312+#include "adapters/alarmsadapter_p.h"
2313
2314 #include <QtCore/QFile>
2315 #include <QtCore/QDir>
2316@@ -30,21 +26,24 @@
2317 #include <QtCore/QJsonObject>
2318 #include <QtCore/QJsonArray>
2319 #include <QtCore/QDebug>
2320-
2321-#define ALARM_DATABASE "%1/alarms.json"
2322-/*
2323- * The main alarm manager engine used from Saucy onwards is EDS (Evolution Data
2324- * Server) based. Any previous release uses the generic "memory" manager engine
2325- * which does not store alarm data, does not schedule organizer events and does
2326- * not give visual or audible reminding.
2327- */
2328-#define ALARM_MANAGER "eds"
2329-#define ALARM_MANAGER_FALLBACK "memory"
2330-#define ALARM_COLLECTION "Alarms"
2331+#include <QtOrganizer/QtOrganizer>
2332+
2333+#include "alarmmanager_p_p.h"
2334+#include "ucalarm_p_p.h"
2335+
2336+static const QString alarmDatabase = QStringLiteral("%1/alarms.json");
2337+
2338+// The main alarm manager engine used from Saucy onwards is EDS (Evolution Data
2339+// Server) based. Any previous release uses the generic "memory" manager engine
2340+// which does not store alarm data, does not schedule organizer events and does
2341+// not give visual or audible reminding.
2342+static const QString alarmManager = QStringLiteral("eds");
2343+static const QString alarmManagerFallback = QStringLiteral("memory");
2344+static const QString alarmCollection = QStringLiteral("Alarms");
2345
2346 // special tags used as workaround for bug #1361702
2347-const char *tagAlarmService = "x-canonical-alarm";
2348-const char *tagDisabledAlarm = "x-canonical-disabled";
2349+static const QString tagAlarmService = QStringLiteral("x-canonical-alarm");
2350+static const QString tagDisabledAlarm = QStringLiteral("x-canonical-disabled");
2351
2352 QTORGANIZER_USE_NAMESPACE
2353
2354@@ -94,7 +93,7 @@
2355 return false;
2356 }
2357 QDateTime dt = AlarmUtils::normalizeDate(date);
2358- if (AlarmsAdapter::get()->manager->managerName() == ALARM_MANAGER) {
2359+ if (AlarmsAdapter::get()->manager->managerName() == alarmManager) {
2360 // use invalid timezone to simulate floating time for EDS backend
2361 dt = QDateTime(dt.date(), dt.time(), QTimeZone());
2362 }
2363@@ -393,12 +392,13 @@
2364 // register QOrganizerItemId comparators so QVariant == operator can compare them
2365 QMetaType::registerComparators<QOrganizerItemId>();
2366
2367- QString envManager(qgetenv("ALARM_BACKEND"));
2368+ QString envManager = QString::fromLocal8Bit(qgetenv("ALARM_BACKEND"));
2369 if (envManager.isEmpty())
2370- envManager = ALARM_MANAGER;
2371+ envManager = alarmManager;
2372 if (!QOrganizerManager::availableManagers().contains(envManager)) {
2373- qWarning() << "WARNING: alarm manager" << envManager << "not installed, using" << QString(ALARM_MANAGER_FALLBACK);
2374- envManager = ALARM_MANAGER_FALLBACK;
2375+ qWarning() << "WARNING: alarm manager" << envManager << "not installed, using"
2376+ << alarmManagerFallback;
2377+ envManager = alarmManagerFallback;
2378 }
2379 manager = new QOrganizerManager(envManager);
2380 manager->setParent(q_ptr);
2381@@ -406,7 +406,7 @@
2382 QList<QOrganizerCollection> collections = manager->collections();
2383 if (collections.count() > 0) {
2384 Q_FOREACH(const QOrganizerCollection &c, collections) {
2385- if (c.metaData(QOrganizerCollection::KeyName).toString() == ALARM_COLLECTION) {
2386+ if (c.metaData(QOrganizerCollection::KeyName).toString() == alarmCollection) {
2387 collection = c;
2388 break;
2389 }
2390@@ -414,9 +414,10 @@
2391 }
2392 if (collection.id().isNull()) {
2393 // create alarm collection
2394- collection.setMetaData(QOrganizerCollection::KeyName, ALARM_COLLECTION);
2395+ collection.setMetaData(QOrganizerCollection::KeyName, alarmCollection);
2396 // EDS requires extra metadata to be set
2397- collection. setExtendedMetaData("collection-type", "Task List");
2398+ collection.setExtendedMetaData(
2399+ QStringLiteral("collection-type"), QStringLiteral("Task List"));
2400 if (!manager->saveCollection(&collection)) {
2401 qWarning() << "WARNING: Creating dedicated collection for alarms was not possible, alarms will be saved into the default collection!";
2402 collection = manager->defaultCollection();
2403@@ -470,10 +471,10 @@
2404 // load fallback manager data
2405 void AlarmsAdapter::loadAlarms()
2406 {
2407- if (manager->managerName() != ALARM_MANAGER_FALLBACK) {
2408+ if (manager->managerName() != alarmManagerFallback) {
2409 return;
2410 }
2411- QFile file(QString(ALARM_DATABASE).arg(QStandardPaths::writableLocation(QStandardPaths::DataLocation)));
2412+ QFile file(alarmDatabase.arg(QStandardPaths::writableLocation(QStandardPaths::DataLocation)));
2413 if (!file.open(QFile::ReadOnly)) {
2414 return;
2415 }
2416@@ -485,12 +486,13 @@
2417
2418 // use UCAlarm to save store JSON data
2419 UCAlarm alarm;
2420- alarm.setMessage(object["message"].toString());
2421- alarm.setDate(QDateTime::fromString(object["date"].toString()));
2422- alarm.setSound(object["sound"].toString());
2423- alarm.setType(static_cast<UCAlarm::AlarmType>(object["type"].toInt()));
2424- alarm.setDaysOfWeek(static_cast<UCAlarm::DaysOfWeek>(object["days"].toInt()));
2425- alarm.setEnabled(object["enabled"].toBool());
2426+ alarm.setMessage(object[QStringLiteral("message")].toString());
2427+ alarm.setDate(QDateTime::fromString(object[QStringLiteral("date")].toString()));
2428+ alarm.setSound(object[QStringLiteral("sound")].toString());
2429+ alarm.setType(static_cast<UCAlarm::AlarmType>(object[QStringLiteral("type")].toInt()));
2430+ alarm.setDaysOfWeek(
2431+ static_cast<UCAlarm::DaysOfWeek>(object[QStringLiteral("days")].toInt()));
2432+ alarm.setEnabled(object[QStringLiteral("enabled")].toBool());
2433
2434 AlarmDataAdapter *pAlarm = static_cast<AlarmDataAdapter*>(UCAlarmPrivate::get(&alarm));
2435 // call checkAlarm to complete field checks (i.e. type vs daysOfWeek, kick date, etc)
2436@@ -504,14 +506,14 @@
2437 // save fallback manager data only
2438 void AlarmsAdapter::saveAlarms()
2439 {
2440- if (manager->managerName() != ALARM_MANAGER_FALLBACK) {
2441+ if (manager->managerName() != alarmManagerFallback) {
2442 return;
2443 }
2444 QDir dir(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
2445 if (!dir.exists()) {
2446 dir.mkpath(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
2447 }
2448- QFile file(QString(ALARM_DATABASE).arg(dir.path()));
2449+ QFile file(alarmDatabase.arg(dir.path()));
2450 if (!file.open(QFile::WriteOnly | QFile::Truncate)) {
2451 return;
2452 }
2453@@ -520,12 +522,12 @@
2454 // create an UCAlarm and set its event to ease conversions
2455 const UCAlarm *alarm = alarmList[i];
2456 QJsonObject object;
2457- object["message"] = alarm->message();
2458- object["date"] = alarm->date().toString();
2459- object["sound"] = alarm->sound().toString();
2460- object["type"] = QJsonValue(alarm->type());
2461- object["days"] = QJsonValue(alarm->daysOfWeek());
2462- object["enabled"] = QJsonValue(alarm->enabled());
2463+ object[QStringLiteral("message")] = alarm->message();
2464+ object[QStringLiteral("date")] = alarm->date().toString();
2465+ object[QStringLiteral("sound")] = alarm->sound().toString();
2466+ object[QStringLiteral("type")] = QJsonValue(alarm->type());
2467+ object[QStringLiteral("days")] = QJsonValue(alarm->daysOfWeek());
2468+ object[QStringLiteral("enabled")] = QJsonValue(alarm->enabled());
2469 data.append(object);
2470
2471 }
2472@@ -559,9 +561,11 @@
2473 {
2474 Q_ASSERT(value.type() == QVariant::Bool);
2475 if (value.toBool()) {
2476- return !todo.tags().contains(tagDisabledAlarm) && todo.tags().contains(tagAlarmService);
2477+ return !todo.tags().contains(tagDisabledAlarm)
2478+ && todo.tags().contains(tagAlarmService);
2479 } else {
2480- return todo.tags().contains(tagDisabledAlarm) && todo.tags().contains(tagAlarmService);
2481+ return todo.tags().contains(tagDisabledAlarm)
2482+ && todo.tags().contains(tagAlarmService);
2483 }
2484 }
2485 case AlarmManager::Date:
2486
2487=== modified file 'src/UbuntuToolkit/adapters/alarmsadapter_p.h'
2488--- src/Ubuntu/UbuntuToolkit/adapters/alarmsadapter_p.h 2016-07-07 15:33:34 +0000
2489+++ src/UbuntuToolkit/adapters/alarmsadapter_p.h 2016-09-27 15:29:21 +0000
2490@@ -19,13 +19,14 @@
2491 #ifndef ALARMSADAPTER_P_H
2492 #define ALARMSADAPTER_P_H
2493
2494-#include "private/ucalarm_p_p.h"
2495-#include "private/alarmmanager_p_p.h"
2496+#include <QtOrganizer/QOrganizerManager>
2497+#include <QtOrganizer/QOrganizerAbstractRequest>
2498+#include <QtOrganizer/QOrganizerItemFetchRequest>
2499+#include <QtOrganizer/QOrganizerTodo>
2500
2501-#include <qorganizer.h>
2502-#include <qorganizermanager.h>
2503-#include <qorganizertodo.h>
2504-#include <ubuntutoolkitglobal.h>
2505+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
2506+#include <UbuntuToolkit/private/ucalarm_p_p.h>
2507+#include <UbuntuToolkit/private/alarmmanager_p_p.h>
2508
2509 QTORGANIZER_USE_NAMESPACE
2510
2511
2512=== modified file 'src/UbuntuToolkit/adapters/dbuspropertywatcher_p.cpp'
2513--- src/Ubuntu/UbuntuToolkit/adapters/dbuspropertywatcher_p.cpp 2016-07-07 07:21:48 +0000
2514+++ src/UbuntuToolkit/adapters/dbuspropertywatcher_p.cpp 2016-09-27 15:29:21 +0000
2515@@ -14,14 +14,18 @@
2516 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2517 */
2518
2519-#include "dbuspropertywatcher_p.h"
2520+#include "adapters/dbuspropertywatcher_p.h"
2521+
2522+#include <sys/types.h>
2523+#include <unistd.h>
2524+
2525 #include <QtDBus/QDBusReply>
2526-#include <unistd.h>
2527-#include <sys/types.h>
2528+#include <QtQml/QQmlInfo>
2529+
2530 #include "i18n_p.h"
2531-#include <QtQml/QQmlInfo>
2532
2533-#define DYNAMIC_PROPERTY "__q_property"
2534+static const char dynamicProperty[] = "__q_property";
2535+static const QString dbusInterface = QStringLiteral("org.freedesktop.DBus.Properties");
2536
2537 UT_NAMESPACE_BEGIN
2538
2539@@ -32,7 +36,7 @@
2540
2541 DBusServiceProperties::DBusServiceProperties(UCServiceProperties *qq)
2542 : UCServicePropertiesPrivate(qq)
2543- , connection("")
2544+ , connection(QStringLiteral(""))
2545 , watcher(0)
2546 , iface(0)
2547 {
2548@@ -50,7 +54,7 @@
2549
2550 if (service.isEmpty() || path.isEmpty()) {
2551 setStatus(UCServiceProperties::ConnectionError);
2552- setError("No service/path specified");
2553+ setError(QStringLiteral("No service/path specified"));
2554 return false;
2555 }
2556
2557@@ -95,14 +99,15 @@
2558 */
2559 bool DBusServiceProperties::setupInterface()
2560 {
2561- QDBusReply<QDBusObjectPath> dbusObjectPath = iface->call("FindUserById", qlonglong(getuid()));
2562+ QDBusReply<QDBusObjectPath> dbusObjectPath =
2563+ iface->call(QStringLiteral("FindUserById"), qlonglong(getuid()));
2564 if (dbusObjectPath.isValid()) {
2565 objectPath = dbusObjectPath.value().path();
2566 iface->connection().connect(
2567 service,
2568 objectPath,
2569- "org.freedesktop.DBus.Properties",
2570- "PropertiesChanged",
2571+ dbusInterface,
2572+ QStringLiteral("PropertiesChanged"),
2573 this,
2574 SLOT(updateProperties(QString,QVariantMap,QStringList)));
2575 return true;
2576@@ -131,7 +136,7 @@
2577 return false;
2578 }
2579 Q_Q(UCServiceProperties);
2580- QDBusInterface readIFace(iface->interface(), objectPath, "org.freedesktop.DBus.Properties", connection);
2581+ QDBusInterface readIFace(iface->interface(), objectPath, dbusInterface, connection);
2582 if (!readIFace.isValid()) {
2583 // report invalid interface only if the property's first letter was with capital one!
2584 if (property[0].isUpper()) {
2585@@ -139,7 +144,7 @@
2586 }
2587 return false;
2588 }
2589- QDBusPendingCall pending = readIFace.asyncCall("Get", adaptor, property);
2590+ QDBusPendingCall pending = readIFace.asyncCall(QStringLiteral("Get"), adaptor, property);
2591 if (pending.isError()) {
2592 warning(pending.error().message());
2593 return false;
2594@@ -149,7 +154,7 @@
2595 this, SLOT(readFinished(QDBusPendingCallWatcher*)));
2596
2597 // set a dynamic property so we know which property are we reading
2598- callWatcher->setProperty(DYNAMIC_PROPERTY, property);
2599+ callWatcher->setProperty(dynamicProperty, property);
2600 return true;
2601 }
2602
2603@@ -161,12 +166,13 @@
2604 if (objectPath.isEmpty()) {
2605 return false;
2606 }
2607- QDBusInterface writeIFace(iface->interface(), objectPath, "org.freedesktop.DBus.Properties", connection);
2608+ QDBusInterface writeIFace(iface->interface(), objectPath, dbusInterface, connection);
2609 if (!writeIFace.isValid()) {
2610 // invalid interface
2611 return false;
2612 }
2613- QDBusMessage msg = writeIFace.call("Set", adaptor, property, QVariant::fromValue(QDBusVariant(value)));
2614+ QDBusMessage msg = writeIFace.call(
2615+ QStringLiteral("Set"), adaptor, property, QVariant::fromValue(QDBusVariant(value)));
2616 return msg.type() == QDBusMessage::ReplyMessage;
2617 }
2618
2619@@ -177,7 +183,7 @@
2620 {
2621 Q_Q(UCServiceProperties);
2622 QDBusPendingReply<QVariant> reply = *call;
2623- QString property = call->property(DYNAMIC_PROPERTY).toString();
2624+ QString property = call->property(dynamicProperty).toString();
2625 scannedProperties.removeAll(property);
2626 if (reply.isError()) {
2627 // remove the property from being watched, as it has no property like that
2628
2629=== modified file 'src/UbuntuToolkit/adapters/dbuspropertywatcher_p.h'
2630--- src/Ubuntu/UbuntuToolkit/adapters/dbuspropertywatcher_p.h 2016-07-07 07:21:48 +0000
2631+++ src/UbuntuToolkit/adapters/dbuspropertywatcher_p.h 2016-09-27 15:29:21 +0000
2632@@ -22,7 +22,7 @@
2633 #include <QtDBus/QDBusServiceWatcher>
2634 #include <QtDBus/QDBusInterface>
2635
2636-#include "ucserviceproperties_p_p.h"
2637+#include <UbuntuToolkit/private/ucserviceproperties_p_p.h>
2638
2639 class QDBusPendingCallWatcher;
2640
2641
2642=== modified file 'src/UbuntuToolkit/alarmmanager_p.cpp'
2643--- src/Ubuntu/UbuntuToolkit/alarmmanager_p.cpp 2016-07-07 07:21:48 +0000
2644+++ src/UbuntuToolkit/alarmmanager_p.cpp 2016-09-27 15:29:21 +0000
2645@@ -17,6 +17,7 @@
2646 */
2647
2648 #include "alarmmanager_p_p.h"
2649+
2650 #include "ucalarm_p_p.h"
2651
2652 UT_NAMESPACE_BEGIN
2653
2654=== modified file 'src/UbuntuToolkit/alarmmanager_p.h'
2655--- src/Ubuntu/UbuntuToolkit/alarmmanager_p.h 2016-07-07 07:21:48 +0000
2656+++ src/UbuntuToolkit/alarmmanager_p.h 2016-09-27 15:29:21 +0000
2657@@ -16,14 +16,14 @@
2658 * Author: Zsombor Egri <zsombor.egri@canonical.com>
2659 */
2660
2661-#ifndef ALARMMANAGER_H
2662-#define ALARMMANAGER_H
2663+#ifndef ALARMMANAGER_P_H
2664+#define ALARMMANAGER_P_H
2665
2666 #include <QtCore/QObject>
2667+#include <QtCore/QSet>
2668 #include <QtQml/QQmlListProperty>
2669-#include <QtCore/QSet>
2670
2671-#include "ucalarm_p.h"
2672+#include <UbuntuToolkit/private/ucalarm_p.h>
2673
2674 UT_NAMESPACE_BEGIN
2675
2676@@ -126,4 +126,4 @@
2677
2678 UT_NAMESPACE_END
2679
2680-#endif // ALARMMANAGER_H
2681+#endif // ALARMMANAGER_P_H
2682
2683=== modified file 'src/UbuntuToolkit/alarmmanager_p_p.h'
2684--- src/Ubuntu/UbuntuToolkit/alarmmanager_p_p.h 2016-07-07 07:21:48 +0000
2685+++ src/UbuntuToolkit/alarmmanager_p_p.h 2016-09-27 15:29:21 +0000
2686@@ -16,13 +16,15 @@
2687 * Author: Zsombor Egri <zsombor.egri@canonical.com>
2688 */
2689
2690-#ifndef ALARMMANAGER_P_H
2691-#define ALARMMANAGER_P_H
2692-
2693-#include "ucalarm_p.h"
2694-#include "alarmmanager_p.h"
2695+#ifndef ALARMMANAGER_P_P_H
2696+#define ALARMMANAGER_P_P_H
2697+
2698+#include <UbuntuToolkit/private/alarmmanager_p.h>
2699+
2700 #include <QtCore/QUrl>
2701
2702+#include <UbuntuToolkit/private/ucalarm_p.h>
2703+
2704 UT_NAMESPACE_BEGIN
2705
2706 class UBUNTUTOOLKIT_EXPORT AlarmManagerPrivate
2707@@ -61,4 +63,4 @@
2708
2709 UT_NAMESPACE_END
2710
2711-#endif // ALARMMANAGER_P_H
2712+#endif // ALARMMANAGER_P_P_H
2713
2714=== modified file 'src/UbuntuToolkit/asyncloader_p.h'
2715--- src/Ubuntu/UbuntuToolkit/asyncloader_p.h 2016-07-07 07:21:48 +0000
2716+++ src/UbuntuToolkit/asyncloader_p.h 2016-09-27 15:29:21 +0000
2717@@ -16,11 +16,12 @@
2718 * Author: Zsombor Egri <zsombor.egri@canonical.com>
2719 */
2720
2721-#ifndef ASYNCLOADER_H
2722-#define ASYNCLOADER_H
2723+#ifndef ASYNCLOADER_P_H
2724+#define ASYNCLOADER_P_H
2725
2726 #include <QtQml/QQmlComponent>
2727-#include <ubuntutoolkitglobal.h>
2728+
2729+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
2730
2731 class QQuickItem;
2732 class QQmlContext;
2733@@ -60,4 +61,4 @@
2734
2735 UT_NAMESPACE_END
2736
2737-#endif // ASYNCLOADER_H
2738+#endif // ASYNCLOADER_P_H
2739
2740=== modified file 'src/UbuntuToolkit/asyncloader_p_p.h'
2741--- src/Ubuntu/UbuntuToolkit/asyncloader_p_p.h 2016-07-07 15:33:34 +0000
2742+++ src/UbuntuToolkit/asyncloader_p_p.h 2016-09-27 15:29:21 +0000
2743@@ -16,14 +16,15 @@
2744 * Author: Zsombor Egri <zsombor.egri@canonical.com>
2745 */
2746
2747-#ifndef ASYNCLOADER_P_H
2748-#define ASYNCLOADER_P_H
2749+#ifndef ASYNCLOADER_P_P_H
2750+#define ASYNCLOADER_P_P_H
2751+
2752+#include <UbuntuToolkit/private/asyncloader_p.h>
2753
2754 #include <QtCore/private/qobject_p.h>
2755 #include <QtQml/QQmlIncubator>
2756-#include <ubuntutoolkitglobal.h>
2757-#include <UbuntuToolkit/private/asyncloader_p.h>
2758-#include <UbuntuToolkit/private/asyncloader_p_p.h>
2759+
2760+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
2761
2762 UT_NAMESPACE_BEGIN
2763
2764@@ -52,4 +53,4 @@
2765
2766 UT_NAMESPACE_END
2767
2768-#endif // ASYNCLOADER_P_H
2769+#endif // ASYNCLOADER_P_P_H
2770
2771=== modified file 'src/UbuntuToolkit/colorutils.cpp'
2772--- src/Ubuntu/UbuntuToolkit/colorutils.cpp 2016-07-07 07:21:48 +0000
2773+++ src/UbuntuToolkit/colorutils.cpp 2016-09-27 15:29:21 +0000
2774@@ -15,7 +15,8 @@
2775 */
2776
2777 #include "colorutils_p.h"
2778-#include <QColor>
2779+
2780+#include <QtGui/QColor>
2781
2782 UT_NAMESPACE_BEGIN
2783
2784
2785=== modified file 'src/UbuntuToolkit/colorutils_p.h'
2786--- src/Ubuntu/UbuntuToolkit/colorutils_p.h 2016-07-07 07:21:48 +0000
2787+++ src/UbuntuToolkit/colorutils_p.h 2016-09-27 15:29:21 +0000
2788@@ -13,11 +13,13 @@
2789 * You should have received a copy of the GNU Lesser General Public License
2790 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2791 */
2792-#ifndef COLORUTILS_H
2793-#define COLORUTILS_H
2794-
2795-#include <QObject>
2796-#include "ubuntutoolkitglobal.h"
2797+
2798+#ifndef COLORUTILS_P_H
2799+#define COLORUTILS_P_H
2800+
2801+#include <QtCore/QObject>
2802+
2803+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
2804
2805 UT_NAMESPACE_BEGIN
2806
2807@@ -31,4 +33,4 @@
2808
2809 UT_NAMESPACE_END
2810
2811-#endif // COLORUTILS_H
2812+#endif // COLORUTILS_P_H
2813
2814=== modified file 'src/UbuntuToolkit/exclusivegroup.cpp'
2815--- src/Ubuntu/UbuntuToolkit/exclusivegroup.cpp 2016-07-18 14:54:46 +0000
2816+++ src/UbuntuToolkit/exclusivegroup.cpp 2016-09-27 15:29:21 +0000
2817@@ -12,14 +12,14 @@
2818 *
2819 * You should have received a copy of the GNU Lesser General Public License
2820 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2821- *
2822 */
2823
2824 #include "exclusivegroup_p.h"
2825+
2826+#include <QtCore/QSignalMapper>
2827+
2828 #include "ucaction_p.h"
2829
2830-#include <QSignalMapper>
2831-
2832 #define CHECKED_PROPERTY "checked"
2833
2834 UT_NAMESPACE_BEGIN
2835
2836=== modified file 'src/UbuntuToolkit/exclusivegroup_p.h'
2837--- src/Ubuntu/UbuntuToolkit/exclusivegroup_p.h 2016-08-22 08:23:50 +0000
2838+++ src/UbuntuToolkit/exclusivegroup_p.h 2016-09-27 15:29:21 +0000
2839@@ -12,17 +12,16 @@
2840 *
2841 * You should have received a copy of the GNU Lesser General Public License
2842 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2843- *
2844 */
2845
2846-#ifndef EXCLUSIVEGROUP_H
2847-#define EXCLUSIVEGROUP_H
2848-
2849-#include "actionlist_p.h"
2850-#include "ubuntutoolkitglobal.h"
2851-
2852-#include <QMetaMethod>
2853-#include <QPointer>
2854+#ifndef EXCLUSIVEGROUP_P_H
2855+#define EXCLUSIVEGROUP_P_H
2856+
2857+#include <QtCore/QMetaMethod>
2858+#include <QtCore/QPointer>
2859+
2860+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
2861+#include <UbuntuToolkit/private/actionlist_p.h>
2862
2863 class QSignalMapper;
2864
2865@@ -59,4 +58,4 @@
2866
2867 UT_NAMESPACE_END
2868
2869-#endif // EXCLUSIVEGROUP_H
2870+#endif // EXCLUSIVEGROUP_P_H
2871
2872=== modified file 'src/UbuntuToolkit/filterbehavior_p.h'
2873--- src/Ubuntu/UbuntuToolkit/filterbehavior_p.h 2016-07-07 07:21:48 +0000
2874+++ src/UbuntuToolkit/filterbehavior_p.h 2016-09-27 15:29:21 +0000
2875@@ -17,11 +17,12 @@
2876 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2877 */
2878
2879-#ifndef FILTERBEHAVIOR_H
2880-#define FILTERBEHAVIOR_H
2881-
2882-#include <QSortFilterProxyModel>
2883-#include <ubuntutoolkitglobal.h>
2884+#ifndef FILTERBEHAVIOR_P_H
2885+#define FILTERBEHAVIOR_P_H
2886+
2887+#include <QtCore/QSortFilterProxyModel>
2888+
2889+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
2890
2891 UT_NAMESPACE_BEGIN
2892
2893@@ -50,4 +51,4 @@
2894
2895 UT_NAMESPACE_END
2896
2897-#endif // FILTERBEHAVIOR_H
2898+#endif // FILTERBEHAVIOR_P_H
2899
2900=== modified file 'src/UbuntuToolkit/i18n.cpp'
2901--- src/Ubuntu/UbuntuToolkit/i18n.cpp 2016-07-07 07:21:48 +0000
2902+++ src/UbuntuToolkit/i18n.cpp 2016-09-27 15:29:21 +0000
2903@@ -17,18 +17,19 @@
2904 */
2905
2906 #include "i18n_p.h"
2907-#include "timeutils_p.h"
2908-#include <QtCore/QDir>
2909
2910 namespace C {
2911 #include <libintl.h>
2912 #include <glib.h>
2913 #include <glib/gi18n.h>
2914 }
2915-
2916 #include <stdlib.h>
2917 #include <locale.h>
2918
2919+#include <QtCore/QDir>
2920+
2921+#include "timeutils_p.h"
2922+
2923 UT_NAMESPACE_BEGIN
2924 /*!
2925 * \qmltype i18n
2926@@ -67,7 +68,7 @@
2927 * Note: $LANGUAGE is implicitly respected by gettext() calls and
2928 * defines the order of multiple locales
2929 */
2930- m_language = setlocale(LC_ALL, "");
2931+ m_language = QString::fromLocal8Bit(setlocale(LC_ALL, ""));
2932 }
2933
2934 UbuntuI18n::~UbuntuI18n()
2935@@ -118,11 +119,11 @@
2936 For click we use APP_DIR/share/locale
2937 e.g. /usr/share/click/preinstalled/com.example.foo/current/share/locale
2938 */
2939- QString appDir(getenv("APP_DIR"));
2940+ QString appDir = QString::fromLocal8Bit(getenv("APP_DIR"));
2941 if (!QDir::isAbsolutePath (appDir)) {
2942- appDir = "/usr";
2943+ appDir = QStringLiteral("/usr");
2944 }
2945- QString localePath(QDir(appDir).filePath("share/locale"));
2946+ QString localePath(QDir(appDir).filePath(QStringLiteral("share/locale")));
2947 C::bindtextdomain(domain.toUtf8(), localePath.toUtf8());
2948 Q_EMIT domainChanged();
2949 }
2950@@ -274,70 +275,89 @@
2951 */
2952 QString UbuntuI18n::relativeDateTime(const QDateTime& datetime)
2953 {
2954+ static const QString ubuntuUiToolkit = QStringLiteral("ubuntu-ui-toolkit");
2955+
2956 QDateTime relativeTo(QDateTime::currentDateTime());
2957 const date_proximity_t prox = getDateProximity(relativeTo, datetime);
2958
2959 switch (prox) {
2960 case DATE_PROXIMITY_NOW:
2961 /* TRANSLATORS: Time based "this is happening/happened now" */
2962- return dtr("ubuntu-ui-toolkit", "Now");
2963+ return dtr(ubuntuUiToolkit, QStringLiteral("Now"));
2964
2965 case DATE_PROXIMITY_HOUR:
2966 {
2967 qint64 diff = datetime.toMSecsSinceEpoch() - relativeTo.toMSecsSinceEpoch();
2968 qint64 minutes = qRound(float(diff) / 60000);
2969 if (minutes < 0) {
2970- return dtr("ubuntu-ui-toolkit", "%1 minute ago", "%1 minutes ago", qAbs(minutes)).arg(qAbs(minutes));
2971+ return dtr(ubuntuUiToolkit, QStringLiteral("%1 minute ago"),
2972+ QStringLiteral("%1 minutes ago"), qAbs(minutes)).arg(qAbs(minutes));
2973 }
2974- return dtr("ubuntu-ui-toolkit", "%1 minute", "%1 minutes", minutes).arg(minutes);
2975+ return dtr(ubuntuUiToolkit, QStringLiteral("%1 minute"),
2976+ QStringLiteral("%1 minutes"), minutes).arg(minutes);
2977 }
2978
2979 case DATE_PROXIMITY_TODAY:
2980 /* en_US example: "1:00 PM" */
2981- /* TRANSLATORS: Please translated these to your locale datetime format using the format specified by
2982- https://qt-project.org/doc/qt-5-snapshot/qdatetime.html#fromString-2 */
2983- return datetime.toString(isLocale12h() ? dtr("ubuntu-ui-toolkit", "h:mm ap"):
2984- /* TRANSLATORS: Please translated these to your locale datetime format using the format specified by
2985- https://qt-project.org/doc/qt-5-snapshot/qdatetime.html#fromString-2 */
2986- dtr("ubuntu-ui-toolkit", "HH:mm"));
2987+ /* TRANSLATORS: Please translate these to your locale datetime
2988+ format using the format specified by
2989+ https://qt-project.org/doc/qt-5-snapshot/qdatetime.html#fromString-2 */
2990+ return datetime.toString(isLocale12h()
2991+ ? dtr(ubuntuUiToolkit, QStringLiteral("h:mm ap"))
2992+ /* TRANSLATORS: Please translate these to your locale datetime
2993+ format using the format specified by
2994+ https://qt-project.org/doc/qt-5-snapshot/qdatetime.html#fromString-2 */
2995+ : dtr(ubuntuUiToolkit, QStringLiteral("HH:mm")));
2996
2997 case DATE_PROXIMITY_YESTERDAY:
2998 /* en_US example: "Yesterday 13:00" */
2999- /* TRANSLATORS: Please translated these to your locale datetime format using the format specified by
3000- https://qt-project.org/doc/qt-5-snapshot/qdatetime.html#fromString-2 */
3001- return datetime.toString(isLocale12h() ? dtr("ubuntu-ui-toolkit", "'Yesterday\u2003'h:mm ap") :
3002- /* TRANSLATORS: Please translated these to your locale datetime format using the format specified by
3003- https://qt-project.org/doc/qt-5-snapshot/qdatetime.html#fromString-2 */
3004- dtr("ubuntu-ui-toolkit", "'Yesterday\u2003'HH:mm"));
3005+ /* TRANSLATORS: Please translate these to your locale datetime
3006+ format using the format specified by
3007+ https://qt-project.org/doc/qt-5-snapshot/qdatetime.html#fromString-2 */
3008+ return datetime.toString(isLocale12h()
3009+ ? dtr(ubuntuUiToolkit, QStringLiteral("'Yesterday\u2003'h:mm ap"))
3010+ /* TRANSLATORS: Please translate these to your locale datetime
3011+ format using the format specified by
3012+ https://qt-project.org/doc/qt-5-snapshot/qdatetime.html#fromString-2 */
3013+ : dtr(ubuntuUiToolkit, QStringLiteral("'Yesterday\u2003'HH:mm")));
3014
3015 case DATE_PROXIMITY_TOMORROW:
3016 /* en_US example: "Tomorrow 1:00 PM" */
3017- /* TRANSLATORS: Please translated these to your locale datetime format using the format specified by
3018- https://qt-project.org/doc/qt-5-snapshot/qdatetime.html#fromString-2 */
3019- return datetime.toString(isLocale12h() ? dtr("ubuntu-ui-toolkit", "'Tomorrow\u2003'h:mm ap") :
3020- /* TRANSLATORS: Please translated these to your locale datetime format using the format specified by
3021- https://qt-project.org/doc/qt-5-snapshot/qdatetime.html#fromString-2 */
3022- dtr("ubuntu-ui-toolkit", "'Tomorrow\u2003'HH:mm"));
3023+ /* TRANSLATORS: Please translate these to your locale datetime
3024+ format using the format specified by
3025+ https://qt-project.org/doc/qt-5-snapshot/qdatetime.html#fromString-2 */
3026+ return datetime.toString(isLocale12h()
3027+ ? dtr(ubuntuUiToolkit, QStringLiteral("'Tomorrow\u2003'h:mm ap"))
3028+ /* TRANSLATORS: Please translate these to your locale datetime
3029+ format using the format specified by
3030+ https://qt-project.org/doc/qt-5-snapshot/qdatetime.html#fromString-2 */
3031+ : dtr(ubuntuUiToolkit, QStringLiteral("'Tomorrow\u2003'HH:mm")));
3032
3033 case DATE_PROXIMITY_LAST_WEEK:
3034 case DATE_PROXIMITY_NEXT_WEEK:
3035 /* en_US example: "Fri 1:00 PM" */
3036- /* TRANSLATORS: Please translated these to your locale datetime format using the format specified by
3037- https://qt-project.org/doc/qt-5-snapshot/qdatetime.html#fromString-2 */
3038- return datetime.toString(isLocale12h() ? dtr("ubuntu-ui-toolkit", "ddd'\u2003'h:mm ap") :
3039- /* TRANSLATORS: Please translated these to your locale datetime format using the format specified by
3040- https://qt-project.org/doc/qt-5-snapshot/qdatetime.html#fromString-2 */
3041- dtr("ubuntu-ui-toolkit", "ddd'\u2003'HH:mm"));
3042+ /* TRANSLATORS: Please translate these to your locale datetime
3043+ format using the format specified by
3044+ https://qt-project.org/doc/qt-5-snapshot/qdatetime.html#fromString-2 */
3045+ return datetime.toString(isLocale12h()
3046+ ? dtr(ubuntuUiToolkit, QStringLiteral("ddd'\u2003'h:mm ap"))
3047+ /* TRANSLATORS: Please translate these to your locale datetime
3048+ format using the format specified by
3049+ https://qt-project.org/doc/qt-5-snapshot/qdatetime.html#fromString-2 */
3050+ : dtr(ubuntuUiToolkit, QStringLiteral("ddd'\u2003'HH:mm")));
3051
3052 case DATE_PROXIMITY_FAR_BACK:
3053 case DATE_PROXIMITY_FAR_FORWARD:
3054 default:
3055- /* TRANSLATORS: Please translated these to your locale datetime format using the format specified by
3056- https://qt-project.org/doc/qt-5-snapshot/qdatetime.html#fromString-2 */
3057- return datetime.toString(isLocale12h() ? dtr("ubuntu-ui-toolkit", "ddd d MMM'\u2003'h:mm ap") :
3058- /* TRANSLATORS: Please translated these to your locale datetime format using the format specified by
3059- https://qt-project.org/doc/qt-5-snapshot/qdatetime.html#fromString-2 */
3060- dtr("ubuntu-ui-toolkit", "ddd d MMM'\u2003'HH:mm"));
3061+ /* TRANSLATORS: Please translate these to your locale datetime
3062+ format using the format specified by
3063+ https://qt-project.org/doc/qt-5-snapshot/qdatetime.html#fromString-2 */
3064+ return datetime.toString(isLocale12h()
3065+ ? dtr(ubuntuUiToolkit, QStringLiteral("ddd d MMM'\u2003'h:mm ap"))
3066+ /* TRANSLATORS: Please translate these to your locale datetime
3067+ format using the format specified by
3068+ https://qt-project.org/doc/qt-5-snapshot/qdatetime.html#fromString-2 */
3069+ : dtr(ubuntuUiToolkit, QStringLiteral("ddd d MMM'\u2003'HH:mm")));
3070 }
3071 return datetime.toString(Qt::DefaultLocaleShortDate);
3072 }
3073
3074=== modified file 'src/UbuntuToolkit/i18n_p.h'
3075--- src/Ubuntu/UbuntuToolkit/i18n_p.h 2016-07-07 07:21:48 +0000
3076+++ src/UbuntuToolkit/i18n_p.h 2016-09-27 15:29:21 +0000
3077@@ -16,11 +16,12 @@
3078 * Author: Tim Peeters <tim.peeters@canonical.com>
3079 */
3080
3081-#ifndef UBUNTU_COMPONENTS_I18N_H
3082-#define UBUNTU_COMPONENTS_I18N_H
3083+#ifndef I18N_P_H
3084+#define I18N_P_H
3085
3086 #include <QtCore/QObject>
3087-#include <ubuntutoolkitglobal.h>
3088+
3089+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
3090
3091 class QQmlContext;
3092 class QQmlEngine;
3093@@ -80,4 +81,4 @@
3094
3095 UT_NAMESPACE_END
3096
3097-#endif // UBUNTU_COMPONENTS_I18N_H
3098+#endif // I18N_P_H
3099
3100=== modified file 'src/UbuntuToolkit/inversemouseareatype.cpp'
3101--- src/Ubuntu/UbuntuToolkit/inversemouseareatype.cpp 2016-07-07 07:21:48 +0000
3102+++ src/UbuntuToolkit/inversemouseareatype.cpp 2016-09-27 15:29:21 +0000
3103@@ -15,7 +15,9 @@
3104 */
3105
3106 #include "inversemouseareatype_p.h"
3107+
3108 #include <QtGui/QGuiApplication>
3109+
3110 #include "quickutils_p.h"
3111
3112 UT_NAMESPACE_BEGIN
3113
3114=== modified file 'src/UbuntuToolkit/inversemouseareatype_p.h'
3115--- src/Ubuntu/UbuntuToolkit/inversemouseareatype_p.h 2016-07-07 07:21:48 +0000
3116+++ src/UbuntuToolkit/inversemouseareatype_p.h 2016-09-27 15:29:21 +0000
3117@@ -13,12 +13,14 @@
3118 * You should have received a copy of the GNU Lesser General Public License
3119 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3120 */
3121-#ifndef INVERSEMOUSEAREATYPE_H
3122-#define INVERSEMOUSEAREATYPE_H
3123-
3124-#include <private/qquickmousearea_p.h>
3125+
3126+#ifndef INVERSEMOUSEAREATYPE_P_H
3127+#define INVERSEMOUSEAREATYPE_P_H
3128+
3129 #include <QtCore/QPointer>
3130-#include <ubuntutoolkitglobal.h>
3131+#include <QtQuick/private/qquickmousearea_p.h>
3132+
3133+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
3134
3135 class QQuickItem;
3136
3137@@ -73,4 +75,4 @@
3138
3139 UT_NAMESPACE_END
3140
3141-#endif // INVERSEMOUSEAREATYPE_H
3142+#endif // INVERSEMOUSEAREATYPE_P_H
3143
3144=== modified file 'src/UbuntuToolkit/label_p.h'
3145--- src/Ubuntu/UbuntuToolkit/label_p.h 2016-07-07 07:21:48 +0000
3146+++ src/UbuntuToolkit/label_p.h 2016-09-27 15:29:21 +0000
3147@@ -14,8 +14,8 @@
3148 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3149 */
3150
3151-#ifndef LABEL_P
3152-#define LABEL_P
3153+#ifndef LABEL_P_H
3154+#define LABEL_P_H
3155
3156 #include "uclabel_p.h"
3157
3158@@ -59,4 +59,4 @@
3159
3160 UT_NAMESPACE_END
3161
3162-#endif // LABEL_P
3163+#endif // LABEL_P_H
3164
3165=== modified file 'src/UbuntuToolkit/listener.cpp'
3166--- src/Ubuntu/UbuntuToolkit/listener.cpp 2016-07-07 07:21:48 +0000
3167+++ src/UbuntuToolkit/listener.cpp 2016-09-27 15:29:21 +0000
3168@@ -16,7 +16,7 @@
3169
3170 #include "listener_p.h"
3171
3172-#include <QQmlContext>
3173+#include <QtQml/QQmlContext>
3174
3175 UT_NAMESPACE_BEGIN
3176
3177
3178=== modified file 'src/UbuntuToolkit/listener_p.h'
3179--- src/Ubuntu/UbuntuToolkit/listener_p.h 2016-07-07 07:21:48 +0000
3180+++ src/UbuntuToolkit/listener_p.h 2016-09-27 15:29:21 +0000
3181@@ -14,11 +14,12 @@
3182 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3183 */
3184
3185-#ifndef UBUNTU_COMPONENTS_LISTENER_H
3186-#define UBUNTU_COMPONENTS_LISTENER_H
3187+#ifndef LISTENER_P_H
3188+#define LISTENER_P_H
3189
3190 #include <QtCore/QObject>
3191-#include <ubuntutoolkitglobal.h>
3192+
3193+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
3194
3195 class QQmlContext;
3196
3197@@ -36,4 +37,4 @@
3198
3199 UT_NAMESPACE_END
3200
3201-#endif // UBUNTU_COMPONENTS_PLUGIN_H
3202+#endif // LISTENER_P_H
3203
3204=== modified file 'src/UbuntuToolkit/livetimer_p.cpp'
3205--- src/Ubuntu/UbuntuToolkit/livetimer_p.cpp 2016-07-07 07:21:48 +0000
3206+++ src/UbuntuToolkit/livetimer_p.cpp 2016-09-27 15:29:21 +0000
3207@@ -15,9 +15,12 @@
3208 */
3209
3210 #include "livetimer_p_p.h"
3211+
3212+#include <QtDBus/QDBusConnection>
3213+
3214 #include "timeutils_p.h"
3215
3216-#include <QDBusConnection>
3217+static const QString dbusService = QStringLiteral("org.freedesktop.timedate1");
3218
3219 UT_NAMESPACE_BEGIN
3220
3221@@ -28,12 +31,10 @@
3222 m_timer.setSingleShot(true);
3223 connect(&m_timer, &QTimer::timeout, this, &SharedLiveTimer::timeout);
3224
3225- QDBusConnection::systemBus().connect("org.freedesktop.timedate1",
3226- "/org/freedesktop/timedate1",
3227- "org.freedesktop.DBus.Properties",
3228- "PropertiesChanged",
3229- this,
3230- SLOT(timedate1PropertiesChanged(QString, QVariantMap, QStringList)));
3231+ QDBusConnection::systemBus().connect(
3232+ dbusService, QStringLiteral("/org/freedesktop/timedate1"),
3233+ QStringLiteral("org.freedesktop.DBus.Properties"), QStringLiteral("PropertiesChanged"),
3234+ this, SLOT(timedate1PropertiesChanged(QString, QVariantMap, QStringList)));
3235 }
3236
3237 void SharedLiveTimer::registerTimer(LiveTimer *timer)
3238@@ -160,8 +161,8 @@
3239
3240 void SharedLiveTimer::timedate1PropertiesChanged(const QString &interface, const QVariantMap &changed, const QStringList &)
3241 {
3242- if (interface != "org.freedesktop.timedate1") return;
3243- if (!changed.contains("Timezone")) return;
3244+ if (interface != dbusService) return;
3245+ if (!changed.contains(QStringLiteral("Timezone"))) return;
3246
3247 QList<LiveTimer*> tmpTimers(m_liveTimers);
3248 Q_FOREACH(LiveTimer* timer, tmpTimers) {
3249
3250=== modified file 'src/UbuntuToolkit/livetimer_p.h'
3251--- src/Ubuntu/UbuntuToolkit/livetimer_p.h 2016-07-07 07:21:48 +0000
3252+++ src/UbuntuToolkit/livetimer_p.h 2016-09-27 15:29:21 +0000
3253@@ -14,12 +14,13 @@
3254 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3255 */
3256
3257-#ifndef LIVETIMER_H
3258-#define LIVETIMER_H
3259-
3260-#include <QObject>
3261-#include <QDateTime>
3262-#include <ubuntutoolkitglobal.h>
3263+#ifndef LIVETIMER_P_H
3264+#define LIVETIMER_P_H
3265+
3266+#include <QtCore/QDateTime>
3267+#include <QtCore/QObject>
3268+
3269+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
3270
3271 UT_NAMESPACE_BEGIN
3272
3273@@ -70,4 +71,4 @@
3274
3275 UT_NAMESPACE_END
3276
3277-#endif // LIVETIMER_H
3278+#endif // LIVETIMER_P_H
3279
3280=== modified file 'src/UbuntuToolkit/livetimer_p_p.h'
3281--- src/Ubuntu/UbuntuToolkit/livetimer_p_p.h 2016-07-07 07:21:48 +0000
3282+++ src/UbuntuToolkit/livetimer_p_p.h 2016-09-27 15:29:21 +0000
3283@@ -14,12 +14,12 @@
3284 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3285 */
3286
3287-#ifndef LIVETIMER_P_H
3288-#define LIVETIMER_P_H
3289-
3290-#include "livetimer_p.h"
3291-
3292-#include <QTimer>
3293+#ifndef LIVETIMER_P_P_H
3294+#define LIVETIMER_P_P_H
3295+
3296+#include <UbuntuToolkit/private/livetimer_p.h>
3297+
3298+#include <QtCore/QTimer>
3299
3300 UT_NAMESPACE_BEGIN
3301
3302@@ -59,4 +59,4 @@
3303
3304 UT_NAMESPACE_END
3305
3306-#endif // LIVETIMER_P_H
3307+#endif // LIVETIMER_P_P_H
3308
3309=== modified file 'src/UbuntuToolkit/menu.cpp'
3310--- src/Ubuntu/UbuntuToolkit/menu.cpp 2016-08-25 14:06:06 +0000
3311+++ src/UbuntuToolkit/menu.cpp 2016-09-27 15:29:21 +0000
3312@@ -14,23 +14,22 @@
3313 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3314 */
3315
3316-#include "menu_p.h"
3317 #include "menu_p_p.h"
3318+
3319+#include <functional>
3320+
3321+#include <QtCore/QPointer>
3322+#include <QtCore/QLoggingCategory>
3323+#include <QtGui/qpa/qplatformtheme.h>
3324+#include <QtGui/qpa/qplatformmenu.h>
3325+#include <QtGui/private/qguiapplication_p.h>
3326+#include <QtQuick/QQuickItem>
3327+#include <QtQuick/private/qquickitem_p.h>
3328+
3329 #include "menubar_p.h"
3330 #include "actionlist_p.h"
3331 #include "menugroup_p.h"
3332
3333-// Qt
3334-#include <QPointer>
3335-#include <QQuickItem>
3336-#include <QLoggingCategory>
3337-#include <QtGui/qpa/qplatformtheme.h>
3338-#include <QtGui/qpa/qplatformmenu.h>
3339-#include <private/qguiapplication_p.h>
3340-#include <private/qquickitem_p.h>
3341-
3342-#include <functional>
3343-
3344 Q_LOGGING_CATEGORY(ucMenu, "ubuntu.components.Menu", QtMsgType::QtWarningMsg)
3345
3346 UT_NAMESPACE_BEGIN
3347@@ -350,8 +349,6 @@
3348 : UCAction(parent)
3349 , d_ptr(new MenuPrivate(this))
3350 {
3351- Q_D(Menu);
3352-
3353 connect(this, SIGNAL(enabledChanged()), this, SLOT(_q_updateEnabled()));
3354 connect(this, SIGNAL(textChanged()), this, SLOT(_q_updateText()));
3355 connect(this, SIGNAL(iconNameChanged()), this, SLOT(_q_updateIcon()));
3356
3357=== modified file 'src/UbuntuToolkit/menu_p.h'
3358--- src/Ubuntu/UbuntuToolkit/menu_p.h 2016-08-25 14:06:06 +0000
3359+++ src/UbuntuToolkit/menu_p.h 2016-09-27 15:29:21 +0000
3360@@ -12,18 +12,17 @@
3361 *
3362 * You should have received a copy of the GNU Lesser General Public License
3363 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3364- *
3365 */
3366
3367 #ifndef MENU_P_H
3368 #define MENU_P_H
3369
3370-#include <QQmlListProperty>
3371-#include <QLoggingCategory>
3372-#include <QPointer>
3373-#include <ubuntutoolkitglobal.h>
3374+#include <QtCore/QLoggingCategory>
3375+#include <QtCore/QPointer>
3376+#include <QtQml/QQmlListProperty>
3377
3378-#include "ucaction_p.h"
3379+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
3380+#include <UbuntuToolkit/private/ucaction_p.h>
3381
3382 Q_DECLARE_LOGGING_CATEGORY(ucMenu);
3383
3384
3385=== modified file 'src/UbuntuToolkit/menu_p_p.h'
3386--- src/Ubuntu/UbuntuToolkit/menu_p_p.h 2016-08-25 14:06:06 +0000
3387+++ src/UbuntuToolkit/menu_p_p.h 2016-09-27 15:29:21 +0000
3388@@ -12,14 +12,14 @@
3389 *
3390 * You should have received a copy of the GNU Lesser General Public License
3391 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3392- *
3393 */
3394
3395 #ifndef MENU_P_P_H
3396 #define MENU_P_P_H
3397
3398-#include "menu_p.h"
3399-#include <ubuntutoolkitglobal.h>
3400+#include <UbuntuToolkit/private/menu_p.h>
3401+
3402+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
3403
3404 class QObject;
3405 class QQmlComponent;
3406
3407=== modified file 'src/UbuntuToolkit/menubar.cpp'
3408--- src/Ubuntu/UbuntuToolkit/menubar.cpp 2016-08-25 14:06:06 +0000
3409+++ src/UbuntuToolkit/menubar.cpp 2016-09-27 15:29:21 +0000
3410@@ -12,19 +12,16 @@
3411 *
3412 * You should have received a copy of the GNU Lesser General Public License
3413 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3414- *
3415 */
3416
3417-#include "menubar_p.h"
3418 #include "menubar_p_p.h"
3419
3420-// Qt
3421-#include <QQuickItem>
3422-#include <QQuickWindow>
3423-#include <QLoggingCategory>
3424-#include <private/qguiapplication_p.h>
3425+#include <QtCore/QLoggingCategory>
3426+#include <QtQuick/QQuickItem>
3427+#include <QtQuick/QQuickWindow>
3428 #include <QtGui/qpa/qplatformtheme.h>
3429 #include <QtGui/qpa/qplatformmenu.h>
3430+#include <QtGui/private/qguiapplication_p.h>
3431
3432 UT_NAMESPACE_BEGIN
3433
3434
3435=== modified file 'src/UbuntuToolkit/menubar_p.h'
3436--- src/Ubuntu/UbuntuToolkit/menubar_p.h 2016-08-25 14:06:06 +0000
3437+++ src/UbuntuToolkit/menubar_p.h 2016-09-27 15:29:21 +0000
3438@@ -12,16 +12,15 @@
3439 *
3440 * You should have received a copy of the GNU Lesser General Public License
3441 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3442- *
3443 */
3444
3445 #ifndef MENUBAR_P_H
3446 #define MENUBAR_P_H
3447
3448-#include "menu_p.h"
3449-#include <ubuntutoolkitglobal.h>
3450+#include <QtQml/QQmlParserStatus>
3451
3452-#include <QQmlParserStatus>
3453+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
3454+#include <UbuntuToolkit/private/menu_p.h>
3455
3456 class QPlatformMenuBar;
3457
3458
3459=== modified file 'src/UbuntuToolkit/menubar_p_p.h'
3460--- src/Ubuntu/UbuntuToolkit/menubar_p_p.h 2016-08-25 14:06:06 +0000
3461+++ src/UbuntuToolkit/menubar_p_p.h 2016-09-27 15:29:21 +0000
3462@@ -12,14 +12,14 @@
3463 *
3464 * You should have received a copy of the GNU Lesser General Public License
3465 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3466- *
3467 */
3468
3469 #ifndef MENUBAR_P_P_H
3470 #define MENUBAR_P_P_H
3471
3472-#include "menubar_p.h"
3473-#include <ubuntutoolkitglobal.h>
3474+#include <UbuntuToolkit/private/menubar_p.h>
3475+
3476+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
3477
3478 class QPlatformMenuBar;
3479
3480
3481=== modified file 'src/UbuntuToolkit/menugroup.cpp'
3482--- src/Ubuntu/UbuntuToolkit/menugroup.cpp 2016-08-25 14:06:06 +0000
3483+++ src/UbuntuToolkit/menugroup.cpp 2016-09-27 15:29:21 +0000
3484@@ -15,6 +15,7 @@
3485 */
3486
3487 #include "menugroup_p.h"
3488+
3489 #include "actionlist_p.h"
3490 #include "ucaction_p.h"
3491
3492
3493=== modified file 'src/UbuntuToolkit/menugroup_p.h'
3494--- src/Ubuntu/UbuntuToolkit/menugroup_p.h 2016-08-25 14:06:06 +0000
3495+++ src/UbuntuToolkit/menugroup_p.h 2016-09-27 15:29:21 +0000
3496@@ -17,11 +17,11 @@
3497 #ifndef MENUGROUP_P_H
3498 #define MENUGROUP_P_H
3499
3500-#include <ubuntutoolkitglobal.h>
3501+#include <QtCore/QObject>
3502+#include <QtCore/QVector>
3503+#include <QtQml/QQmlListProperty>
3504
3505-#include <QObject>
3506-#include <QVector>
3507-#include <QQmlListProperty>
3508+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
3509
3510 UT_NAMESPACE_BEGIN
3511
3512
3513=== modified file 'src/UbuntuToolkit/mousetouchadaptor.cpp'
3514--- src/Ubuntu/UbuntuToolkit/mousetouchadaptor.cpp 2016-07-07 07:56:34 +0000
3515+++ src/UbuntuToolkit/mousetouchadaptor.cpp 2016-09-27 15:29:21 +0000
3516@@ -19,12 +19,11 @@
3517
3518 #include "mousetouchadaptor_p_p.h"
3519
3520-#include <qpa/qplatformnativeinterface.h>
3521-#include <qpa/qwindowsysteminterface.h>
3522-
3523-#include <QCoreApplication>
3524-#include <QMouseEvent>
3525-#include <QTest>
3526+#include <QtCore/QDebug>
3527+#include <QtGui/QGuiApplication>
3528+#include <QtGui/QMouseEvent>
3529+#include <QtGui/qpa/qplatformnativeinterface.h>
3530+#include <QtGui/qpa/qwindowsysteminterface.h>
3531
3532 #ifdef UBUNTUTOOLKIT_ENABLE_X11_TOUCH_EMULATION
3533 #define ENABLE_TOUCH_EMULATION
3534
3535=== modified file 'src/UbuntuToolkit/mousetouchadaptor_p.h'
3536--- src/Ubuntu/UbuntuToolkit/mousetouchadaptor_p.h 2016-07-07 18:17:56 +0000
3537+++ src/UbuntuToolkit/mousetouchadaptor_p.h 2016-09-27 15:29:21 +0000
3538@@ -17,13 +17,13 @@
3539 * Zsombor Egri <zsomboir.egri@canonical.com>
3540 */
3541
3542-#ifndef MOUSE_TOUCH_ADAPTOR_H
3543-#define MOUSE_TOUCH_ADAPTOR_H
3544-
3545-#include "ubuntutoolkitglobal.h"
3546+#ifndef MOUSETOUCHADAPTOR_P_H
3547+#define MOUSETOUCHADAPTOR_P_H
3548
3549 #include <QtCore/QObject>
3550
3551+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
3552+
3553 class QMouseEvent;
3554 class QTouchDevice;
3555 class QQmlEngine;
3556@@ -60,4 +60,4 @@
3557
3558 UT_NAMESPACE_END
3559
3560-#endif // MOUSE_TOUCH_ADAPTOR_H
3561+#endif // MOUSETOUCHADAPTOR_P_H
3562
3563=== modified file 'src/UbuntuToolkit/mousetouchadaptor_p_p.h'
3564--- src/Ubuntu/UbuntuToolkit/mousetouchadaptor_p_p.h 2016-07-07 07:21:48 +0000
3565+++ src/UbuntuToolkit/mousetouchadaptor_p_p.h 2016-09-27 15:29:21 +0000
3566@@ -16,13 +16,15 @@
3567 * Authored by: Zsombor Egri <zsombor.egri@canonical.com>
3568 */
3569
3570-#ifndef MOUSETOUCHADAPTOR_P
3571-#define MOUSETOUCHADAPTOR_P
3572-
3573-#include "mousetouchadaptor_p.h"
3574+#ifndef MOUSETOUCHADAPTOR_P_P_H
3575+#define MOUSETOUCHADAPTOR_P_P_H
3576+
3577+#include <UbuntuToolkit/private/mousetouchadaptor_p.h>
3578+
3579+#include <QtCore/QAbstractNativeEventFilter>
3580 #include <QtCore/private/qobject_p.h>
3581-#include <QtCore/QAbstractNativeEventFilter>
3582-#include <QWindow>
3583+#include <QtGui/QWindow>
3584+
3585 #include <xcb/xcb.h>
3586
3587 UT_NAMESPACE_BEGIN
3588@@ -73,5 +75,4 @@
3589
3590 UT_NAMESPACE_END
3591
3592-#endif // MOUSETOUCHADAPTOR_P
3593-
3594+#endif // MOUSETOUCHADAPTOR_P_P_H
3595
3596=== modified file 'src/UbuntuToolkit/mousetouchadaptor_x11.cpp'
3597--- src/Ubuntu/UbuntuToolkit/mousetouchadaptor_x11.cpp 2016-07-07 07:21:48 +0000
3598+++ src/UbuntuToolkit/mousetouchadaptor_x11.cpp 2016-09-27 15:29:21 +0000
3599@@ -55,11 +55,10 @@
3600
3601 #include "mousetouchadaptor_p_p.h"
3602
3603-#include <qpa/qplatformnativeinterface.h>
3604-
3605-#include <QCoreApplication>
3606-#include <QMouseEvent>
3607-#include <QTest>
3608+#include <QtGui/QGuiApplication>
3609+#include <QtGui/QMouseEvent>
3610+#include <QtGui/qpa/qplatformnativeinterface.h>
3611+#include <QtTest/qtesttouch.h>
3612
3613 #include <X11/extensions/XInput2.h>
3614 #include <X11/extensions/XI2proto.h>
3615
3616=== modified file 'src/UbuntuToolkit/privates/appheaderbase.cpp'
3617--- src/Ubuntu/UbuntuToolkit/privates/appheaderbase.cpp 2016-07-07 07:21:48 +0000
3618+++ src/UbuntuToolkit/privates/appheaderbase.cpp 2016-09-27 15:29:21 +0000
3619@@ -15,6 +15,7 @@
3620 */
3621
3622 #include "appheaderbase_p.h"
3623+
3624 #include "ucstyleditembase_p_p.h"
3625
3626 UT_NAMESPACE_BEGIN
3627@@ -35,7 +36,7 @@
3628 , m_animate(true)
3629 {
3630 connect(this, &UCHeader::themeChanged, this, &UCAppHeaderBase::themeChanged2);
3631- UCStyledItemBasePrivate::get(this)->styleDocument = "PageHeadStyle";
3632+ UCStyledItemBasePrivate::get(this)->styleDocument = QStringLiteral("PageHeadStyle");
3633 }
3634
3635 UCTheme* UCAppHeaderBase::theme2()
3636
3637=== modified file 'src/UbuntuToolkit/privates/appheaderbase_p.h'
3638--- src/Ubuntu/UbuntuToolkit/privates/appheaderbase_p.h 2016-07-07 07:21:48 +0000
3639+++ src/UbuntuToolkit/privates/appheaderbase_p.h 2016-09-27 15:29:21 +0000
3640@@ -14,10 +14,10 @@
3641 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3642 */
3643
3644-#ifndef APPHEADERBASE_H
3645-#define APPHEADERBASE_H
3646+#ifndef APPHEADERBASE_P_H
3647+#define APPHEADERBASE_P_H
3648
3649-#include "ucheader_p.h"
3650+#include <UbuntuToolkit/private/ucheader_p.h>
3651
3652 UT_NAMESPACE_BEGIN
3653
3654@@ -62,4 +62,4 @@
3655
3656 UT_NAMESPACE_END
3657
3658-#endif // APPHEADERBASE_H
3659+#endif // APPHEADERBASE_P_H
3660
3661=== modified file 'src/UbuntuToolkit/privates/frame.cpp'
3662--- src/Ubuntu/UbuntuToolkit/privates/frame.cpp 2016-07-07 07:21:48 +0000
3663+++ src/UbuntuToolkit/privates/frame.cpp 2016-09-27 15:29:21 +0000
3664@@ -16,11 +16,13 @@
3665 * Author: Loïc Molinari <loic.molinari@canonical.com>
3666 */
3667
3668-#include "frame_p.h"
3669-#include "textures_p.h"
3670+#include "privates/frame_p.h"
3671+
3672 #include <QtGui/QOpenGLContext>
3673 #include <QtGui/QOpenGLFunctions>
3674
3675+#include "privates/textures_p.h"
3676+
3677 UT_NAMESPACE_BEGIN
3678
3679 const QRgb defaultColor = qRgba(255, 255, 255, 255);
3680
3681=== modified file 'src/UbuntuToolkit/privates/frame_p.h'
3682--- src/Ubuntu/UbuntuToolkit/privates/frame_p.h 2016-07-07 07:21:48 +0000
3683+++ src/UbuntuToolkit/privates/frame_p.h 2016-09-27 15:29:21 +0000
3684@@ -16,13 +16,14 @@
3685 * Author: Loïc Molinari <loic.molinari@canonical.com>
3686 */
3687
3688-#ifndef FRAME_H
3689-#define FRAME_H
3690+#ifndef FRAME_P_H
3691+#define FRAME_P_H
3692
3693 #include <QtQuick/QQuickItem>
3694 #include <QtQuick/QSGMaterial>
3695 #include <QtQuick/QSGNode>
3696-#include <ubuntutoolkitglobal.h>
3697+
3698+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
3699
3700 UT_NAMESPACE_BEGIN
3701
3702@@ -101,4 +102,4 @@
3703
3704 UT_NAMESPACE_END
3705
3706-#endif // FRAME_H
3707+#endif // FRAME_P_H
3708
3709=== modified file 'src/UbuntuToolkit/privates/listitemdragarea.cpp'
3710--- src/Ubuntu/UbuntuToolkit/privates/listitemdragarea.cpp 2016-08-14 09:06:34 +0000
3711+++ src/UbuntuToolkit/privates/listitemdragarea.cpp 2016-09-27 15:29:21 +0000
3712@@ -15,15 +15,17 @@
3713 */
3714
3715 #include "listitemdragarea_p.h"
3716-#include "listitemdraghandler_p.h"
3717-#include "uclistitem_p_p.h"
3718-#include "ucunits_p.h"
3719-#include "i18n_p.h"
3720+
3721 #include <QtCore/QtMath>
3722 #include <QtQml/QQmlInfo>
3723 #include <QtQuick/private/qquickitem_p.h>
3724 #include <QtQuick/private/qquickflickable_p.h>
3725
3726+#include "privates/listitemdraghandler_p.h"
3727+#include "uclistitem_p_p.h"
3728+#include "ucunits_p.h"
3729+#include "i18n_p.h"
3730+
3731 #define IMPLICIT_DRAG_WIDTH_GU 5
3732 #define DRAG_SCROLL_TIMEOUT 15
3733
3734@@ -46,7 +48,7 @@
3735 setAcceptedMouseButtons(Qt::LeftButton);
3736
3737 // for testing purposes
3738- setObjectName("drag_area");
3739+ setObjectName(QStringLiteral("drag_area"));
3740 }
3741
3742 void ListItemDragArea::init(UCViewItemsAttached *viewItems)
3743
3744=== modified file 'src/UbuntuToolkit/privates/listitemdragarea_p.h'
3745--- src/Ubuntu/UbuntuToolkit/privates/listitemdragarea_p.h 2016-07-07 07:21:48 +0000
3746+++ src/UbuntuToolkit/privates/listitemdragarea_p.h 2016-09-27 15:29:21 +0000
3747@@ -14,14 +14,15 @@
3748 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3749 */
3750
3751-#ifndef LISTITEMDRAGAREA_H
3752-#define LISTITEMDRAGAREA_H
3753+#ifndef LISTITEMDRAGAREA_P_H
3754+#define LISTITEMDRAGAREA_P_H
3755
3756-#include <ubuntutoolkitglobal.h>
3757-#include "uclistitem_p.h"
3758 #include <QtCore/QBasicTimer>
3759 #include <QtCore/QPointer>
3760
3761+#include <UbuntuToolkit/private/uclistitem_p.h>
3762+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
3763+
3764 class QQuickFlickable;
3765
3766 UT_NAMESPACE_BEGIN
3767@@ -58,4 +59,4 @@
3768
3769 UT_NAMESPACE_END
3770
3771-#endif // LISTITEMDRAGAREA_H
3772+#endif // LISTITEMDRAGAREA_P_H
3773
3774=== modified file 'src/UbuntuToolkit/privates/listitemdraghandler.cpp'
3775--- src/Ubuntu/UbuntuToolkit/privates/listitemdraghandler.cpp 2016-07-07 07:21:48 +0000
3776+++ src/UbuntuToolkit/privates/listitemdraghandler.cpp 2016-09-27 15:29:21 +0000
3777@@ -14,11 +14,12 @@
3778 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3779 */
3780
3781-#include "listitemdraghandler_p.h"
3782-#include "uclistitem_p.h"
3783+#include "privates/listitemdraghandler_p.h"
3784+
3785+#include <QtQuick/private/qquickanimation_p.h>
3786+
3787 #include "uclistitem_p_p.h"
3788-#include <propertychange_p.h>
3789-#include <QtQuick/private/qquickanimation_p.h>
3790+#include "propertychange_p.h"
3791
3792 UT_NAMESPACE_BEGIN
3793
3794@@ -60,7 +61,7 @@
3795 connect(animation, &QQuickAbstractAnimation::stopped,
3796 this, &ListItemDragHandler::dropItem, Qt::DirectConnection);
3797 // force properties to contain only the 'y' coordinate
3798- animation->setProperties("y");
3799+ animation->setProperties(QStringLiteral("y"));
3800 animation->setTargetObject(listItem);
3801 animation->setFrom(listItem->y());
3802 animation->setTo(targetPos.y());
3803
3804=== modified file 'src/UbuntuToolkit/privates/listitemdraghandler_p.h'
3805--- src/Ubuntu/UbuntuToolkit/privates/listitemdraghandler_p.h 2016-07-07 07:21:48 +0000
3806+++ src/UbuntuToolkit/privates/listitemdraghandler_p.h 2016-09-27 15:29:21 +0000
3807@@ -14,13 +14,14 @@
3808 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3809 */
3810
3811-#ifndef LISTITEMDRAGHANDLER_H
3812-#define LISTITEMDRAGHANDLER_H
3813+#ifndef LISTITEMDRAGHANDLER_P_H
3814+#define LISTITEMDRAGHANDLER_P_H
3815
3816 #include <QtCore/QObject>
3817 #include <QtCore/QPointer>
3818 #include <QtCore/QPointF>
3819-#include <ubuntutoolkitglobal.h>
3820+
3821+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
3822
3823 UT_NAMESPACE_BEGIN
3824
3825@@ -49,4 +50,4 @@
3826
3827 UT_NAMESPACE_END
3828
3829-#endif // LISTITEMDRAGHANDLER_H
3830+#endif // LISTITEMDRAGHANDLER_P_H
3831
3832=== modified file 'src/UbuntuToolkit/privates/listitemselection.cpp'
3833--- src/Ubuntu/UbuntuToolkit/privates/listitemselection.cpp 2016-07-07 07:21:48 +0000
3834+++ src/UbuntuToolkit/privates/listitemselection.cpp 2016-09-27 15:29:21 +0000
3835@@ -14,7 +14,8 @@
3836 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3837 */
3838
3839-#include "listitemselection_p.h"
3840+#include "privates/listitemselection_p.h"
3841+
3842 #include "uclistitem_p_p.h"
3843
3844 UT_NAMESPACE_BEGIN
3845
3846=== modified file 'src/UbuntuToolkit/privates/listitemselection_p.h'
3847--- src/Ubuntu/UbuntuToolkit/privates/listitemselection_p.h 2016-07-07 07:21:48 +0000
3848+++ src/UbuntuToolkit/privates/listitemselection_p.h 2016-09-27 15:29:21 +0000
3849@@ -14,12 +14,13 @@
3850 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3851 */
3852
3853-#ifndef LISTITEMSELECTION_H
3854-#define LISTITEMSELECTION_H
3855+#ifndef LISTITEMSELECTION_P_H
3856+#define LISTITEMSELECTION_P_H
3857
3858 #include <QtCore/QObject>
3859 #include <QtCore/QPointer>
3860-#include <ubuntutoolkitglobal.h>
3861+
3862+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
3863
3864 UT_NAMESPACE_BEGIN
3865
3866@@ -58,4 +59,4 @@
3867
3868 UT_NAMESPACE_END
3869
3870-#endif // LISTITEMSELECTION_H
3871+#endif // LISTITEMSELECTION_P_H
3872
3873=== modified file 'src/UbuntuToolkit/privates/listviewextensions.cpp'
3874--- src/Ubuntu/UbuntuToolkit/privates/listviewextensions.cpp 2016-08-01 13:19:05 +0000
3875+++ src/UbuntuToolkit/privates/listviewextensions.cpp 2016-09-27 15:29:21 +0000
3876@@ -16,19 +16,24 @@
3877 * Author Zsombor Egri <zsombor.egri@canonical.com>
3878 */
3879
3880-#include "listviewextensions_p.h"
3881-#include "uclistitem_p_p.h"
3882-#include "quickutils_p.h"
3883+#include "privates/listviewextensions_p.h"
3884+
3885 #include <QtQuick/QQuickItem>
3886 #include <QtQuick/private/qquickflickable_p.h>
3887 #include <QtQuick/private/qquickitemview_p.h> // for QQuickItemView::BottomToTop
3888
3889+#include "uclistitem_p_p.h"
3890+#include "quickutils_p.h"
3891+
3892 UT_NAMESPACE_BEGIN
3893
3894 ListViewProxy::ListViewProxy(QQuickFlickable *listView, QObject *parent)
3895 : QObject(parent)
3896 , listView(listView)
3897+ , _currentItem(Q_NULLPTR)
3898 {
3899+ connect(listView, SIGNAL(currentItemChanged()), this, SLOT(onCurrentItemChanged()), Qt::DirectConnection);
3900+ onCurrentItemChanged();
3901 }
3902 ListViewProxy::~ListViewProxy()
3903 {
3904@@ -51,7 +56,7 @@
3905
3906 QQuickItem *ListViewProxy::currentItem()
3907 {
3908- return listView->property("currentItem").value<QQuickItem*>();
3909+ return _currentItem;
3910 }
3911
3912 int ListViewProxy::currentIndex()
3913@@ -100,7 +105,7 @@
3914
3915 void ListViewProxy::setKeyNavigationForListView(bool value)
3916 {
3917- UCListItem *listItem = qobject_cast<UCListItem*>(currentItem());
3918+ UCListItem *listItem = qobject_cast<UCListItem*>(_currentItem);
3919 if (listItem) {
3920 UCListItemPrivate::get(listItem)->setListViewKeyNavigation(value);
3921 listItem->update();
3922@@ -114,8 +119,7 @@
3923 case Qt::TabFocusReason:
3924 case Qt::BacktabFocusReason:
3925 {
3926- QQuickItem *currentItem = this->currentItem();
3927- if (!currentItem && count() > 0) {
3928+ if (!_currentItem && count() > 0) {
3929 // set the first one to be the focus
3930 setCurrentIndex(0);
3931 setKeyNavigationForListView(true);
3932@@ -135,25 +139,22 @@
3933 int key = event->key();
3934 Qt::Orientation orientation = this->orientation();
3935
3936- if ((orientation == Qt::Vertical && key != Qt::Key_Up && key != Qt::Key_Down)
3937- || (orientation == Qt::Horizontal && key != Qt::Key_Left && key != Qt::Key_Right)) {
3938- return false;
3939- }
3940- // effectiveLayoutDirection takes into account effectiveLayoutMirror and layoutDirection.
3941- bool isRtl = (Qt::RightToLeft == listView->property("effectiveLayoutDirection").toInt());
3942- bool isBtt = (QQuickItemView::BottomToTop == listView->property("verticalLayoutDirection").toInt());
3943- bool forwards = (isBtt ? key == Qt::Key_Up : key == Qt::Key_Down) || (isRtl ? key == Qt::Key_Left : key == Qt::Key_Right);
3944- int oldIndex = this->currentIndex();
3945- int currentIndex = this->currentIndex();
3946- int count = this->count();
3947-
3948- if (currentIndex >= 0 && count > 0) {
3949- currentIndex = qBound<int>(0, forwards ? currentIndex + 1 : currentIndex - 1, count - 1);
3950- setCurrentIndex(currentIndex);
3951- setKeyNavigationForListView(true);
3952- }
3953-
3954- return (oldIndex != currentIndex);
3955+ if ((orientation == Qt::Vertical && (key == Qt::Key_Up || key == Qt::Key_Down))
3956+ || (orientation == Qt::Horizontal && (key == Qt::Key_Left || key == Qt::Key_Right))) {
3957+ keyNavigation = true;
3958+ }
3959+
3960+ return false;
3961+}
3962+
3963+void ListViewProxy::onCurrentItemChanged()
3964+{
3965+ setKeyNavigationForListView(false);
3966+ _currentItem = listView->property("currentItem").value<QQuickItem*>();
3967+ if (_currentItem && _currentItem->isEnabled()) {
3968+ setKeyNavigationForListView(keyNavigation);
3969+ keyNavigation = false;
3970+ }
3971 }
3972
3973 UT_NAMESPACE_END
3974
3975=== modified file 'src/UbuntuToolkit/privates/listviewextensions_p.h'
3976--- src/Ubuntu/UbuntuToolkit/privates/listviewextensions_p.h 2016-07-07 07:21:48 +0000
3977+++ src/UbuntuToolkit/privates/listviewextensions_p.h 2016-09-27 15:29:21 +0000
3978@@ -16,11 +16,13 @@
3979 * Author Zsombor Egri <zsombor.egri@canonical.com>
3980 */
3981
3982-#ifndef LISTVIEWEXTENSIONS_H
3983-#define LISTVIEWEXTENSIONS_H
3984+#ifndef LISTVIEWEXTENSIONS_P_H
3985+#define LISTVIEWEXTENSIONS_P_H
3986
3987 #include <QtCore/QObject>
3988-#include <ubuntutoolkitglobal.h>
3989+#include <QtCore/QPointer>
3990+
3991+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
3992
3993 class QQuickFlickable;
3994 class QQuickItem;
3995@@ -56,11 +58,14 @@
3996 bool focusInEvent(QFocusEvent *event);
3997 bool keyPressEvent(QKeyEvent *event);
3998 void setKeyNavigationForListView(bool value);
3999+ Q_SLOT void onCurrentItemChanged();
4000 private:
4001 QQuickFlickable *listView;
4002+ QPointer<QQuickItem> _currentItem;
4003 bool isEventFilter:1;
4004+ bool keyNavigation:1;
4005 };
4006
4007 UT_NAMESPACE_END
4008
4009-#endif // LISTVIEWEXTENSIONS_H
4010+#endif // LISTVIEWEXTENSIONS_P_H
4011
4012=== modified file 'src/UbuntuToolkit/privates/splitviewhandler.cpp'
4013--- src/Ubuntu/UbuntuToolkit/privates/splitviewhandler.cpp 2016-08-26 05:40:23 +0000
4014+++ src/UbuntuToolkit/privates/splitviewhandler.cpp 2016-09-27 15:29:21 +0000
4015@@ -16,13 +16,15 @@
4016 * Author: Zsombor Egri <zsombor.egri@canonical.com>
4017 */
4018
4019-#include "splitviewhandler_p_p.h"
4020+#include "privates/splitviewhandler_p.h"
4021+
4022+#include <QtQml/QQmlEngine>
4023+#include <QtQml/QQmlInfo>
4024 #include <QtQuick/private/qquickanchors_p.h>
4025 #include <QtQuick/private/qquickitem_p.h>
4026 #include <QtQuick/private/qquickevents_p_p.h>
4027-#include <QtQml/QQmlEngine>
4028-#include <QtQml/QQmlInfo>
4029-#include <splitview_p_p.h>
4030+
4031+#include "splitview_p_p.h"
4032
4033 UT_NAMESPACE_BEGIN
4034
4035@@ -30,7 +32,7 @@
4036 : QQuickMouseArea(parent)
4037 {
4038 // for testing purposes
4039- setObjectName("resize_handle");
4040+ setObjectName(QStringLiteral("resize_handle"));
4041 setFlag(ItemHasContents);
4042 setHoverEnabled(true);
4043 setAcceptedButtons(Qt::LeftButton);
4044@@ -113,7 +115,7 @@
4045 // and set the new delegate - if any
4046 if (SplitViewPrivate::get(view)->handleDelegate) {
4047 QQmlContext *context = new QQmlContext(qmlContext(this), this);
4048- context->setContextProperty("handle", QVariant::fromValue(this));
4049+ context->setContextProperty(QStringLiteral("handle"), QVariant::fromValue(this));
4050 QObject *object = SplitViewPrivate::get(view)->handleDelegate->beginCreate(context);
4051 if (object) {
4052 QQuickItem *item = qobject_cast<QQuickItem*>(object);
4053
4054=== renamed file 'src/Ubuntu/UbuntuToolkit/privates/splitviewhandler_p_p.h' => 'src/UbuntuToolkit/privates/splitviewhandler_p.h'
4055--- src/Ubuntu/UbuntuToolkit/privates/splitviewhandler_p_p.h 2016-08-26 05:40:23 +0000
4056+++ src/UbuntuToolkit/privates/splitviewhandler_p.h 2016-09-27 15:29:21 +0000
4057@@ -16,13 +16,14 @@
4058 * Author: Zsombor Egri <zsombor.egri@canonical.com>
4059 */
4060
4061-#ifndef SPLITVIEWHANDLER_H
4062-#define SPLITVIEWHANDLER_H
4063+#ifndef SPLITVIEWHANDLER_P_H
4064+#define SPLITVIEWHANDLER_P_H
4065
4066+#include <QtCore/QPointer>
4067 #include <QtQuick/QQuickItem>
4068-#include <QtCore/QPointer>
4069 #include <QtQuick/private/qquickmousearea_p.h>
4070-#include <ubuntutoolkitglobal.h>
4071+
4072+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
4073
4074 UT_NAMESPACE_BEGIN
4075
4076@@ -49,4 +50,4 @@
4077
4078 UT_NAMESPACE_END
4079
4080-#endif // SPLITVIEWHANDLER_H
4081+#endif // SPLITVIEWHANDLER_P_H
4082
4083=== modified file 'src/UbuntuToolkit/privates/threelabelsslot_p.cpp'
4084--- src/Ubuntu/UbuntuToolkit/privates/threelabelsslot_p.cpp 2016-07-18 17:18:13 +0000
4085+++ src/UbuntuToolkit/privates/threelabelsslot_p.cpp 2016-09-27 15:29:21 +0000
4086@@ -14,7 +14,8 @@
4087 * along with this program. If not, see <http://www.gnu.org/licenses/>.
4088 */
4089
4090-#include "threelabelsslot_p.h"
4091+#include "privates/threelabelsslot_p.h"
4092+
4093 #include "label_p.h"
4094 #include "ucunits_p.h"
4095 #include "ucfontutils_p.h"
4096
4097=== modified file 'src/UbuntuToolkit/privates/threelabelsslot_p.h'
4098--- src/Ubuntu/UbuntuToolkit/privates/threelabelsslot_p.h 2016-06-21 13:16:07 +0000
4099+++ src/UbuntuToolkit/privates/threelabelsslot_p.h 2016-09-27 15:29:21 +0000
4100@@ -14,12 +14,12 @@
4101 * along with this program. If not, see <http://www.gnu.org/licenses/>.
4102 */
4103
4104-#ifndef THREELABELSSLOT_H
4105-#define THREELABELSSLOT_H
4106-
4107-#include <QQuickItem>
4108-#include <private/qquickitem_p.h>
4109-#include <ubuntutoolkitglobal.h>
4110+#ifndef THREELABELSSLOT_P_H
4111+#define THREELABELSSLOT_P_H
4112+
4113+#include <QtQuick/private/qquickitem_p.h>
4114+
4115+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
4116
4117 //The padding between title and the string below it (i.e. subtitle, or
4118 //summary, when subtitle is empty)
4119@@ -89,4 +89,4 @@
4120
4121 UT_NAMESPACE_END
4122
4123-#endif // THREELABELSSLOT_H
4124+#endif // THREELABELSSLOT_P_H
4125
4126=== modified file 'src/UbuntuToolkit/privates/ucpagewrapper.cpp'
4127--- src/Ubuntu/UbuntuToolkit/privates/ucpagewrapper.cpp 2016-08-08 11:51:22 +0000
4128+++ src/UbuntuToolkit/privates/ucpagewrapper.cpp 2016-09-27 15:29:21 +0000
4129@@ -14,11 +14,12 @@
4130 * along with this program. If not, see <http://www.gnu.org/licenses/>.
4131 */
4132
4133-#include "ucpagewrapper_p_p.h"
4134-#include "ucpagewrapperincubator_p.h"
4135-
4136-#include <QQmlEngine>
4137-#include <QQmlContext>
4138+#include "privates/ucpagewrapper_p_p.h"
4139+
4140+#include <QtQml/QQmlEngine>
4141+#include <QtQml/QQmlContext>
4142+
4143+#include "privates/ucpagewrapperincubator_p.h"
4144
4145 UT_NAMESPACE_BEGIN
4146
4147
4148=== modified file 'src/UbuntuToolkit/privates/ucpagewrapper_p.h'
4149--- src/Ubuntu/UbuntuToolkit/privates/ucpagewrapper_p.h 2016-07-07 07:21:48 +0000
4150+++ src/UbuntuToolkit/privates/ucpagewrapper_p.h 2016-09-27 15:29:21 +0000
4151@@ -14,11 +14,11 @@
4152 * along with this program. If not, see <http://www.gnu.org/licenses/>.
4153 */
4154
4155-#ifndef UCPAGEWRAPPER_H
4156-#define UCPAGEWRAPPER_H
4157+#ifndef UCPAGEWRAPPER_P_H
4158+#define UCPAGEWRAPPER_P_H
4159
4160-#include <ubuntutoolkitglobal.h>
4161-#include "ucpagetreenode_p.h"
4162+#include <UbuntuToolkit/private/ucpagetreenode_p.h>
4163+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
4164
4165 UT_NAMESPACE_BEGIN
4166
4167
4168=== modified file 'src/UbuntuToolkit/privates/ucpagewrapper_p_p.h'
4169--- src/Ubuntu/UbuntuToolkit/privates/ucpagewrapper_p_p.h 2016-07-07 07:21:48 +0000
4170+++ src/UbuntuToolkit/privates/ucpagewrapper_p_p.h 2016-09-27 15:29:21 +0000
4171@@ -14,12 +14,13 @@
4172 * along with this program. If not, see <http://www.gnu.org/licenses/>.
4173 */
4174
4175-#ifndef UCPAGEWRAPPER_P_H
4176-#define UCPAGEWRAPPER_P_H
4177-
4178-#include <ubuntutoolkitglobal.h>
4179-#include "ucpagetreenode_p_p.h"
4180-#include "ucpagewrapper_p.h"
4181+#ifndef UCPAGEWRAPPER_P_P_H
4182+#define UCPAGEWRAPPER_P_P_H
4183+
4184+#include <UbuntuToolkit/private/ucpagewrapper_p.h>
4185+
4186+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
4187+#include <UbuntuToolkit/private/ucpagetreenode_p_p.h>
4188
4189 UT_NAMESPACE_BEGIN
4190
4191@@ -80,4 +81,4 @@
4192
4193 UT_NAMESPACE_END
4194
4195-#endif // UCPAGEWRAPPER_P_H
4196+#endif // UCPAGEWRAPPER_P_P_H
4197
4198=== modified file 'src/UbuntuToolkit/privates/ucpagewrapperincubator.cpp'
4199--- src/Ubuntu/UbuntuToolkit/privates/ucpagewrapperincubator.cpp 2016-06-17 11:26:12 +0000
4200+++ src/UbuntuToolkit/privates/ucpagewrapperincubator.cpp 2016-09-27 15:29:21 +0000
4201@@ -14,9 +14,10 @@
4202 * along with this program. If not, see <http://www.gnu.org/licenses/>.
4203 */
4204
4205-#include "ucpagewrapperincubator_p.h"
4206-#include <QVariantMap>
4207-#include <QQmlInfo>
4208+#include "privates/ucpagewrapperincubator_p.h"
4209+
4210+#include <QtCore/QVariantMap>
4211+#include <QtQml/QQmlInfo>
4212
4213 UT_NAMESPACE_BEGIN
4214
4215
4216=== modified file 'src/UbuntuToolkit/privates/ucpagewrapperincubator_p.h'
4217--- src/Ubuntu/UbuntuToolkit/privates/ucpagewrapperincubator_p.h 2016-06-17 11:26:12 +0000
4218+++ src/UbuntuToolkit/privates/ucpagewrapperincubator_p.h 2016-09-27 15:29:21 +0000
4219@@ -14,14 +14,15 @@
4220 * along with this program. If not, see <http://www.gnu.org/licenses/>.
4221 */
4222
4223-#ifndef UCPAGEWRAPPERINCUBATOR_H
4224-#define UCPAGEWRAPPERINCUBATOR_H
4225-
4226-#include <QObject>
4227-#include <QQmlIncubator>
4228-#include <QJSValue>
4229-#include <QVariant>
4230-#include <ubuntutoolkitglobal.h>
4231+#ifndef UCPAGEWRAPPERINCUBATOR_P_H
4232+#define UCPAGEWRAPPERINCUBATOR_P_H
4233+
4234+#include <QtCore/QObject>
4235+#include <QtCore/QVariant>
4236+#include <QtQml/QQmlIncubator>
4237+#include <QtQml/QJSValue>
4238+
4239+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
4240
4241 UT_NAMESPACE_BEGIN
4242
4243@@ -61,4 +62,4 @@
4244
4245 UT_NAMESPACE_END
4246
4247-#endif // UCPAGEWRAPPERINCUBATOR_H
4248+#endif // UCPAGEWRAPPERINCUBATOR_P_H
4249
4250=== modified file 'src/UbuntuToolkit/privates/ucscrollbarutils.cpp'
4251--- src/Ubuntu/UbuntuToolkit/privates/ucscrollbarutils.cpp 2016-08-01 13:48:02 +0000
4252+++ src/UbuntuToolkit/privates/ucscrollbarutils.cpp 2016-09-27 15:29:21 +0000
4253@@ -16,7 +16,8 @@
4254 * Author: Andrea Bernabei <andrea.bernabei@canonical.com>
4255 */
4256
4257-#include "ucscrollbarutils_p.h"
4258+#include "privates/ucscrollbarutils_p.h"
4259+
4260 #include <QtQuick/private/qquickitem_p.h>
4261
4262 UT_NAMESPACE_BEGIN
4263
4264=== modified file 'src/UbuntuToolkit/privates/ucscrollbarutils_p.h'
4265--- src/Ubuntu/UbuntuToolkit/privates/ucscrollbarutils_p.h 2016-08-01 13:48:02 +0000
4266+++ src/UbuntuToolkit/privates/ucscrollbarutils_p.h 2016-09-27 15:29:21 +0000
4267@@ -16,11 +16,12 @@
4268 * Author: Andrea Bernabei <andrea.bernabei@canonical.com>
4269 */
4270
4271-#ifndef UCSCROLLBARUTILS_H
4272-#define UCSCROLLBARUTILS_H
4273-
4274-#include <QObject>
4275-#include <ubuntutoolkitglobal.h>
4276+#ifndef UCSCROLLBARUTILS_P_H
4277+#define UCSCROLLBARUTILS_P_H
4278+
4279+#include <QtCore/QObject>
4280+
4281+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
4282
4283 class QQuickItem;
4284
4285@@ -38,4 +39,4 @@
4286
4287 UT_NAMESPACE_END
4288
4289-#endif // UCSCROLLBARUTILS_H
4290+#endif // UCSCROLLBARUTILS_P_H
4291
4292=== modified file 'src/UbuntuToolkit/propertychange_p.h'
4293--- src/Ubuntu/UbuntuToolkit/propertychange_p.h 2016-07-07 07:21:48 +0000
4294+++ src/UbuntuToolkit/propertychange_p.h 2016-09-27 15:29:21 +0000
4295@@ -17,14 +17,14 @@
4296 #ifndef PROPERTYCHANGE_P_H
4297 #define PROPERTYCHANGE_P_H
4298
4299+#include <QtCore/QObject>
4300 #include <QtCore/QVariant>
4301-#include <QtCore/QObject>
4302+#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
4303+#include <QtCore/QExplicitlySharedDataPointer>
4304+#endif
4305 #include <QtQml/QQmlProperty>
4306
4307-#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
4308-#include <QtCore/QExplicitlySharedDataPointer>
4309-#endif
4310-#include <ubuntutoolkitglobal.h>
4311+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
4312
4313 class QQmlAbstractBinding;
4314
4315
4316=== modified file 'src/UbuntuToolkit/qquickclipboard.cpp'
4317--- src/Ubuntu/UbuntuToolkit/qquickclipboard.cpp 2016-07-07 18:17:56 +0000
4318+++ src/UbuntuToolkit/qquickclipboard.cpp 2016-09-27 15:29:21 +0000
4319@@ -16,10 +16,11 @@
4320 * Author: Zsombor Egri <zsombor.egri@canonical.com>
4321 */
4322
4323+#include "qquickclipboard_p_p.h"
4324+
4325 #include <QtGui/QClipboard>
4326 #include <QtGui/QGuiApplication>
4327
4328-#include "qquickclipboard_p_p.h"
4329 #include "qquickmimedata_p.h"
4330
4331 UT_NAMESPACE_BEGIN
4332
4333=== modified file 'src/UbuntuToolkit/qquickclipboard_p.h'
4334--- src/Ubuntu/UbuntuToolkit/qquickclipboard_p.h 2016-07-07 18:17:56 +0000
4335+++ src/UbuntuToolkit/qquickclipboard_p.h 2016-09-27 15:29:21 +0000
4336@@ -16,13 +16,14 @@
4337 * Author: Zsombor Egri <zsombor.egri@canonical.com>
4338 */
4339
4340-#ifndef QQUICKCLIPBOARD_H
4341-#define QQUICKCLIPBOARD_H
4342+#ifndef QQUICKCLIPBOARD_P_H
4343+#define QQUICKCLIPBOARD_P_H
4344
4345 #include <QtCore/QObject>
4346 #include <QtQml/QJSEngine>
4347 #include <QtQml/QQmlEngine>
4348-#include <ubuntutoolkitglobal.h>
4349+
4350+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
4351
4352 class QQmlEngine;
4353 class QJSEngine;
4354@@ -60,4 +61,4 @@
4355
4356 UT_NAMESPACE_END
4357
4358-#endif // QQUICKCLIPBOARD_H
4359+#endif // QQUICKCLIPBOARD_P_H
4360
4361=== modified file 'src/UbuntuToolkit/qquickclipboard_p_p.h'
4362--- src/Ubuntu/UbuntuToolkit/qquickclipboard_p_p.h 2016-07-07 18:17:56 +0000
4363+++ src/UbuntuToolkit/qquickclipboard_p_p.h 2016-09-27 15:29:21 +0000
4364@@ -16,12 +16,13 @@
4365 * Author: Zsombor Egri <zsombor.egri@canonical.com>
4366 */
4367
4368-#ifndef QQUICKCLIPBOARD_P_H
4369-#define QQUICKCLIPBOARD_P_H
4370-
4371-#include "qquickclipboard_p.h"
4372+#ifndef QQUICKCLIPBOARD_P_P_H
4373+#define QQUICKCLIPBOARD_P_P_H
4374+
4375+#include <UbuntuToolkit/private/qquickclipboard_p.h>
4376+
4377+#include <QtCore/private/qobject_p.h>
4378 #include <QtGui/QClipboard>
4379-#include <QtCore/private/qobject_p.h>
4380
4381 UT_NAMESPACE_BEGIN
4382
4383@@ -41,4 +42,4 @@
4384
4385 UT_NAMESPACE_END
4386
4387-#endif // QQUICKCLIPBOARD_P_H
4388+#endif // QQUICKCLIPBOARD_P_P_H
4389
4390=== modified file 'src/UbuntuToolkit/qquickmimedata.cpp'
4391--- src/Ubuntu/UbuntuToolkit/qquickmimedata.cpp 2016-07-07 07:21:48 +0000
4392+++ src/UbuntuToolkit/qquickmimedata.cpp 2016-09-27 15:29:21 +0000
4393@@ -16,14 +16,14 @@
4394 * Author: Zsombor Egri <zsombor.egri@canonical.com>
4395 */
4396
4397-#include <QtGui/QClipboard>
4398-#include <QtGui/QGuiApplication>
4399+#include "qquickmimedata_p.h"
4400+
4401 #include <QtCore/QMimeData>
4402 #include <QtCore/QMimeDatabase>
4403 #include <QtCore/QMimeType>
4404-#include "qquickmimedata_p.h"
4405-
4406-#include <QDebug>
4407+#include <QtCore/QDebug>
4408+#include <QtGui/QClipboard>
4409+#include <QtGui/QGuiApplication>
4410
4411 UT_NAMESPACE_BEGIN
4412
4413@@ -198,11 +198,14 @@
4414 QMimeDatabase db;
4415 for (int i = 0; i < mlist.length() / 2; i++) {
4416 QString type = mlist[2 * i].toString();
4417- if (db.mimeTypeForName(type).isValid() || type == "application/x-color") {
4418+ // FIXME(loicm) Just went through that while converting the code base to
4419+ // QStringLiteral, the else can't be executed here and that smells
4420+ // like a bug.
4421+ if (db.mimeTypeForName(type).isValid() || type == QStringLiteral("application/x-color")) {
4422 QByteArray data = mlist[2 * i + 1].toByteArray();
4423 mimeData->setData(type, data);
4424 ret = true;
4425- } else if (type == "application/x-color") {
4426+ } else if (type == QStringLiteral("application/x-color")) {
4427 // for some reason colors are not taken in other way...
4428 mimeData->setColorData(mlist[2 * i + 1]);
4429 ret = true;
4430
4431=== modified file 'src/UbuntuToolkit/qquickmimedata_p.h'
4432--- src/Ubuntu/UbuntuToolkit/qquickmimedata_p.h 2016-07-07 07:21:48 +0000
4433+++ src/UbuntuToolkit/qquickmimedata_p.h 2016-09-27 15:29:21 +0000
4434@@ -16,14 +16,15 @@
4435 * Author: Zsombor Egri <zsombor.egri@canonical.com>
4436 */
4437
4438-#ifndef QQUICKMIMEDATA_H
4439-#define QQUICKMIMEDATA_H
4440+#ifndef QQUICKMIMEDATA_P_H
4441+#define QQUICKMIMEDATA_P_H
4442
4443 #include <QtCore/QMimeData>
4444 #include <QtCore/QStringList>
4445+#include <QtCore/QUrl>
4446 #include <QtGui/QColor>
4447-#include <QtCore/QUrl>
4448-#include "qquickclipboard_p.h"
4449+
4450+#include <UbuntuToolkit/private/qquickclipboard_p.h>
4451
4452 UT_NAMESPACE_BEGIN
4453
4454@@ -74,4 +75,4 @@
4455
4456 UT_NAMESPACE_END
4457
4458-#endif // QQUICKMIMEDATA_H
4459+#endif // QQUICKMIMEDATA_P_H
4460
4461=== modified file 'src/UbuntuToolkit/quickutils.cpp'
4462--- src/Ubuntu/UbuntuToolkit/quickutils.cpp 2016-07-07 07:21:48 +0000
4463+++ src/UbuntuToolkit/quickutils.cpp 2016-09-27 15:29:21 +0000
4464@@ -12,23 +12,21 @@
4465 *
4466 * You should have received a copy of the GNU Lesser General Public License
4467 * along with this program. If not, see <http://www.gnu.org/licenses/>.
4468- *
4469 */
4470
4471 #include "quickutils_p.h"
4472
4473-#include <QGuiApplication>
4474-#include <QtQuick/QQuickView>
4475-#include <QtQuick/QQuickItem>
4476-#include <QtQml/QQmlContext>
4477 #include <QtCore/QAbstractListModel>
4478 #include <QtCore/QAbstractProxyModel>
4479+#include <QtGui/QGuiApplication>
4480+#include <QtQml/QQmlContext>
4481 #include <QtQml/QQmlPropertyMap>
4482 #include <QtQml/QQmlInfo>
4483 #include <QtQml/QQmlEngine>
4484-
4485-#include <private/qquicktextinput_p.h>
4486-#include <private/qquicktextedit_p.h>
4487+#include <QtQuick/QQuickView>
4488+#include <QtQuick/QQuickItem>
4489+#include <QtQuick/private/qquicktextinput_p.h>
4490+#include <QtQuick/private/qquicktextedit_p.h>
4491
4492 UT_NAMESPACE_BEGIN
4493
4494@@ -36,12 +34,13 @@
4495
4496 QuickUtils::QuickUtils(QObject *parent) :
4497 QObject(parent),
4498+ m_rootWindow(0),
4499 m_rootView(0),
4500 m_mouseAttached(false),
4501 m_keyboardAttached(false)
4502 {
4503 QGuiApplication::instance()->installEventFilter(this);
4504- m_omitIM << "ibus" << "none" << "compose";
4505+ m_omitIM << QStringLiteral("ibus") << QStringLiteral("none") << QStringLiteral("compose");
4506 }
4507
4508 /*!
4509@@ -86,7 +85,7 @@
4510 // make sure we have the m_rootView updated
4511 lookupQuickView();
4512 if (!object) {
4513- return (m_rootView) ? m_rootView->rootObject() : 0;
4514+ return m_rootView ? m_rootView->rootObject() : (m_rootWindow ? m_rootWindow->contentItem() : 0);
4515 }
4516
4517 QQuickItem *item = qobject_cast<QQuickItem*>(object);
4518@@ -114,7 +113,7 @@
4519
4520 QString QuickUtils::inputMethodProvider() const
4521 {
4522- QString im(getenv("QT_IM_MODULE"));
4523+ QString im = QString::fromLocal8Bit(getenv("QT_IM_MODULE"));
4524
4525 return m_omitIM.contains(im) ? QString() : im;
4526 }
4527@@ -138,10 +137,10 @@
4528 QString QuickUtils::className(QObject *item)
4529 {
4530 if (!item) {
4531- return QString("(null)");
4532+ return QStringLiteral("(null)");
4533 }
4534- QString result = item->metaObject()->className();
4535- return result.left(result.indexOf("_QML"));
4536+ QString result = QString::fromLatin1(item->metaObject()->className());
4537+ return result.left(result.indexOf(QStringLiteral("_QML")));
4538 }
4539
4540 /*!
4541@@ -156,8 +155,8 @@
4542 const QMetaObject *mo = object->metaObject();
4543 QString className;
4544 while (mo) {
4545- className = mo->className();
4546- className = className.left(className.indexOf("_QML"));
4547+ className = QString::fromLatin1(mo->className());
4548+ className = className.left(className.indexOf(QStringLiteral("_QML")));
4549 if (className == fromClass) {
4550 return true;
4551 }
4552@@ -175,9 +174,10 @@
4553 */
4554 void QuickUtils::lookupQuickView()
4555 {
4556- if (m_rootView)
4557+ if (m_rootWindow)
4558 return;
4559 Q_FOREACH (QWindow *w, QGuiApplication::topLevelWindows()) {
4560+ m_rootWindow = qobject_cast<QQuickWindow*>(w);
4561 m_rootView = qobject_cast<QQuickView*>(w);
4562 if (m_rootView) {
4563 // connect in case we get the root object changed
4564
4565=== modified file 'src/UbuntuToolkit/quickutils_p.h'
4566--- src/Ubuntu/UbuntuToolkit/quickutils_p.h 2016-07-07 07:21:48 +0000
4567+++ src/UbuntuToolkit/quickutils_p.h 2016-09-27 15:29:21 +0000
4568@@ -12,7 +12,6 @@
4569 *
4570 * You should have received a copy of the GNU Lesser General Public License
4571 * along with this program. If not, see <http://www.gnu.org/licenses/>.
4572- *
4573 */
4574
4575 #ifndef QUICKUTILS_P_H
4576@@ -21,7 +20,8 @@
4577 #include <QtCore/QObject>
4578 #include <QtCore/QPointer>
4579 #include <QtQuick/QQuickView>
4580-#include <ubuntutoolkitglobal.h>
4581+
4582+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
4583
4584 class QQuickItem;
4585 class QQmlEngine;
4586@@ -85,6 +85,7 @@
4587
4588 private:
4589 explicit QuickUtils(QObject *parent = 0);
4590+ QPointer<QQuickWindow> m_rootWindow;
4591 QPointer<QQuickView> m_rootView;
4592 QStringList m_omitIM;
4593 bool m_mouseAttached;
4594
4595=== modified file 'src/UbuntuToolkit/sortbehavior_p.h'
4596--- src/Ubuntu/UbuntuToolkit/sortbehavior_p.h 2016-07-07 07:21:48 +0000
4597+++ src/UbuntuToolkit/sortbehavior_p.h 2016-09-27 15:29:21 +0000
4598@@ -17,11 +17,12 @@
4599 * along with this program. If not, see <http://www.gnu.org/licenses/>.
4600 */
4601
4602-#ifndef SORTBEHAVIOR_H
4603-#define SORTBEHAVIOR_H
4604-
4605-#include <QSortFilterProxyModel>
4606-#include <ubuntutoolkitglobal.h>
4607+#ifndef SORTBEHAVIOR_P_H
4608+#define SORTBEHAVIOR_P_H
4609+
4610+#include <QtCore/QSortFilterProxyModel>
4611+
4612+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
4613
4614 UT_NAMESPACE_BEGIN
4615
4616@@ -50,4 +51,4 @@
4617
4618 UT_NAMESPACE_END
4619
4620-#endif // SORTBEHAVIOR_H
4621+#endif // SORTBEHAVIOR_P_H
4622
4623=== modified file 'src/UbuntuToolkit/sortfiltermodel.cpp'
4624--- src/Ubuntu/UbuntuToolkit/sortfiltermodel.cpp 2016-08-16 08:43:28 +0000
4625+++ src/UbuntuToolkit/sortfiltermodel.cpp 2016-09-27 15:29:21 +0000
4626@@ -113,11 +113,12 @@
4627 int
4628 QSortFilterProxyModelQML::roleByName(const QString& roleName) const
4629 {
4630+ const QByteArray roleNameByteArray = roleName.toUtf8();
4631 const QHash<int, QByteArray> roles = roleNames();
4632 QHashIterator<int, QByteArray> i(roles);
4633 while (i.hasNext()) {
4634 i.next();
4635- if (i.value() == roleName)
4636+ if (i.value() == roleNameByteArray)
4637 return i.key();
4638 }
4639 return 0;
4640@@ -224,7 +225,7 @@
4641 QHashIterator<int, QByteArray> i(roles);
4642 while (i.hasNext()) {
4643 i.next();
4644- res.insert(i.value(), index(row, 0).data(i.key()));
4645+ res.insert(QString::fromUtf8(i.value()), index(row, 0).data(i.key()));
4646 }
4647 return res;
4648 }
4649
4650=== modified file 'src/UbuntuToolkit/sortfiltermodel_p.h'
4651--- src/Ubuntu/UbuntuToolkit/sortfiltermodel_p.h 2016-08-16 08:43:28 +0000
4652+++ src/UbuntuToolkit/sortfiltermodel_p.h 2016-09-27 15:29:21 +0000
4653@@ -18,12 +18,13 @@
4654 * along with this program. If not, see <http://www.gnu.org/licenses/>.
4655 */
4656
4657-#ifndef QSORTFILTERPROXYMODELQML_H
4658-#define QSORTFILTERPROXYMODELQML_H
4659-
4660-#include <QSortFilterProxyModel>
4661-#include "sortbehavior_p.h"
4662-#include "filterbehavior_p.h"
4663+#ifndef SORTFILTERMODEL_P_H
4664+#define SORTFILTERMODEL_P_H
4665+
4666+#include <QtCore/QSortFilterProxyModel>
4667+
4668+#include <UbuntuToolkit/private/sortbehavior_p.h>
4669+#include <UbuntuToolkit/private/filterbehavior_p.h>
4670
4671 UT_NAMESPACE_BEGIN
4672
4673@@ -73,4 +74,4 @@
4674
4675 UT_NAMESPACE_END
4676
4677-#endif // QSORTFILTERPROXYMODELQML_H
4678+#endif // SORTFILTERMODEL_P_H
4679
4680=== modified file 'src/UbuntuToolkit/splitview.cpp'
4681--- src/Ubuntu/UbuntuToolkit/splitview.cpp 2016-08-11 14:47:05 +0000
4682+++ src/UbuntuToolkit/splitview.cpp 2016-09-27 15:29:21 +0000
4683@@ -16,16 +16,15 @@
4684 * Author: Zsombor Egri <zsombor.egri@canonical.com>
4685 */
4686
4687+#include "splitview_p_p.h"
4688+
4689+#include <QtQml/QQmlInfo>
4690+#include <QtQuick/private/qquickanchors_p.h>
4691 #include <QtQuick/private/qquickitem_p.h>
4692-#include <QtQuick/private/qquickanchors_p.h>
4693-#include <QtQml/QQmlInfo>
4694
4695-#include "splitview_p.h"
4696-#include "splitview_p_p.h"
4697 #include "ucunits_p.h"
4698 #include "ucpagetreenode_p.h"
4699-
4700-#include "privates/splitviewhandler_p_p.h"
4701+#include "privates/splitviewhandler_p.h"
4702
4703 #define DEFAULT_SPACING_DP 4
4704
4705
4706=== modified file 'src/UbuntuToolkit/splitview_p.h'
4707--- src/Ubuntu/UbuntuToolkit/splitview_p.h 2016-08-09 13:23:04 +0000
4708+++ src/UbuntuToolkit/splitview_p.h 2016-09-27 15:29:21 +0000
4709@@ -21,7 +21,7 @@
4710
4711 #include <QtQuick/private/qquickpositioners_p.h>
4712
4713-#include "ubuntutoolkitglobal.h"
4714+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
4715
4716 UT_NAMESPACE_BEGIN
4717
4718
4719=== modified file 'src/UbuntuToolkit/splitview_p_p.h'
4720--- src/Ubuntu/UbuntuToolkit/splitview_p_p.h 2016-08-10 07:34:04 +0000
4721+++ src/UbuntuToolkit/splitview_p_p.h 2016-09-27 15:29:21 +0000
4722@@ -19,7 +19,8 @@
4723 #ifndef SPLITVIEW_P_P_H
4724 #define SPLITVIEW_P_P_H
4725
4726-#include "splitview_p.h"
4727+#include <UbuntuToolkit/private/splitview_p.h>
4728+
4729 #include <QtCore/private/qobject_p.h>
4730
4731 UT_NAMESPACE_BEGIN
4732
4733=== modified file 'src/UbuntuToolkit/splitviewlayout.cpp'
4734--- src/Ubuntu/UbuntuToolkit/splitviewlayout.cpp 2016-08-11 14:07:52 +0000
4735+++ src/UbuntuToolkit/splitviewlayout.cpp 2016-09-27 15:29:21 +0000
4736@@ -15,12 +15,12 @@
4737 * Author: Zsombor Egri <zsombor.egri@canonical.com>
4738 */
4739
4740+#include "splitview_p_p.h"
4741+
4742+#include <QtQuick/private/qquickanchors_p.h>
4743 #include <QtQuick/private/qquickitem_p.h>
4744-#include <QtQuick/private/qquickanchors_p.h>
4745 #include <QtQml/QQmlInfo>
4746
4747-#include "splitview_p.h"
4748-#include "splitview_p_p.h"
4749 #include "ucmathutils_p.h"
4750
4751 UT_NAMESPACE_BEGIN
4752
4753=== modified file 'src/UbuntuToolkit/statesaverbackend_p.cpp'
4754--- src/Ubuntu/UbuntuToolkit/statesaverbackend_p.cpp 2016-07-07 07:21:48 +0000
4755+++ src/UbuntuToolkit/statesaverbackend_p.cpp 2016-09-27 15:29:21 +0000
4756@@ -17,18 +17,19 @@
4757 */
4758
4759 #include "statesaverbackend_p.h"
4760-#include "ucapplication_p.h"
4761-#include <QtQml/QQmlContext>
4762-#include <QtQml/QQmlProperty>
4763-#include <QtQml/qqmlinfo.h>
4764-#include <QtQml/qqml.h>
4765+
4766 #include <QtCore/QCoreApplication>
4767 #include <QtCore/QFile>
4768+#include <QtCore/QStandardPaths>
4769 #include <QtCore/QStringList>
4770+#include <QtQml/QtQml>
4771+#include <QtQml/QQmlContext>
4772+#include <QtQml/QQmlInfo>
4773+#include <QtQml/QQmlProperty>
4774+
4775 #include "i18n_p.h"
4776 #include "quickutils_p.h"
4777-#include <QtCore/QStandardPaths>
4778-
4779+#include "ucapplication_p.h"
4780 #include "unixsignalhandler_p.h"
4781
4782 UT_NAMESPACE_BEGIN
4783@@ -90,13 +91,13 @@
4784 // see bug https://bugreports.qt-project.org/browse/QTBUG-41735
4785 QString runtimeDir = QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation);
4786 if (runtimeDir.isEmpty()) {
4787- runtimeDir = qgetenv("XDG_RUNTIME_DIR");
4788+ runtimeDir = QString::fromLocal8Bit(qgetenv("XDG_RUNTIME_DIR"));
4789 }
4790 if (runtimeDir.isEmpty()) {
4791 qCritical() << "[StateSaver] No XDG_RUNTIME_DIR path set, cannot create appstate file.";
4792 return;
4793 }
4794- m_archive = new QSettings(QString("%1/%2/statesaver.appstate").
4795+ m_archive = new QSettings(QStringLiteral("%1/%2/statesaver.appstate").
4796 arg(runtimeDir).
4797 arg(applicationName), QSettings::NativeFormat);
4798 m_archive->setFallbacksEnabled(false);
4799@@ -170,7 +171,8 @@
4800 // skip the property
4801 continue;
4802 }
4803- QQmlProperty qmlProperty(item, propertyName.toLocal8Bit().constData(), qmlContext(item));
4804+ QQmlProperty qmlProperty(
4805+ item, QString::fromLatin1(propertyName.toLocal8Bit().constData()), qmlContext(item));
4806 if (qmlProperty.isValid() && qmlProperty.isWritable()) {
4807 QVariant type = m_archive.data()->value(propertyName + "_TYPE");
4808 value.convert(type.toInt());
4809@@ -182,9 +184,9 @@
4810 "object %2 has type %3 and cannot be set to value \"%4\" of"
4811 " type %5").arg(propertyName)
4812 .arg(qmlContext(item)->nameForObject(item))
4813- .arg(qmlProperty.propertyTypeName())
4814+ .arg(QString::fromLatin1(qmlProperty.propertyTypeName()))
4815 .arg(value.toString())
4816- .arg(value.typeName());
4817+ .arg(QString::fromLatin1(value.typeName()));
4818 }
4819 } else {
4820 qmlInfo(item) << QStringLiteral("property \"%1\" does not exist or is not writable for object %2")
4821@@ -192,7 +194,7 @@
4822 }
4823 }
4824 // drop cache once properties are successfully restored
4825- m_archive.data()->remove("");
4826+ m_archive.data()->remove(QStringLiteral(""));
4827 m_archive.data()->endGroup();
4828 // restore leaved group if needed
4829 if (restorePreviousGroup) {
4830@@ -209,7 +211,8 @@
4831 m_archive.data()->beginGroup(id);
4832 int result = 0;
4833 Q_FOREACH(const QString &propertyName, properties) {
4834- QQmlProperty qmlProperty(item, propertyName.toLocal8Bit().constData());
4835+ QQmlProperty qmlProperty(
4836+ item, QString::fromLatin1(propertyName.toLocal8Bit().constData()));
4837 if (qmlProperty.isValid()) {
4838 QVariant value = qmlProperty.read();
4839 if (static_cast<QMetaType::Type>(value.type()) != QMetaType::QObjectStar) {
4840
4841=== modified file 'src/UbuntuToolkit/statesaverbackend_p.h'
4842--- src/Ubuntu/UbuntuToolkit/statesaverbackend_p.h 2016-07-06 09:51:06 +0000
4843+++ src/UbuntuToolkit/statesaverbackend_p.h 2016-09-27 15:29:21 +0000
4844@@ -20,12 +20,13 @@
4845 #define STATESAVERBACKEND_P_H
4846
4847 #include <QtCore/QObject>
4848-#include <QtCore/QSettings>
4849 #include <QtCore/QPointer>
4850 #include <QtCore/QSet>
4851+#include <QtCore/QSettings>
4852+#include <QtCore/QStack>
4853 #include <QtCore/QTimer>
4854-#include <QtCore/QStack>
4855-#include <ubuntutoolkitglobal.h>
4856+
4857+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
4858
4859 UT_NAMESPACE_BEGIN
4860
4861
4862=== modified file 'src/UbuntuToolkit/timeutils_p.h'
4863--- src/Ubuntu/UbuntuToolkit/timeutils_p.h 2016-07-07 07:21:48 +0000
4864+++ src/UbuntuToolkit/timeutils_p.h 2016-09-27 15:29:21 +0000
4865@@ -17,12 +17,12 @@
4866 #ifndef TIMEUTILS_P_H
4867 #define TIMEUTILS_P_H
4868
4869-#include "livetimer_p.h"
4870+#include <QtCore/QDateTime>
4871+#include <QtCore/QLocale>
4872+#include <QtCore/QObject>
4873+#include <QtCore/QTimer>
4874
4875-#include <QDateTime>
4876-#include <QLocale>
4877-#include <QObject>
4878-#include <QTimer>
4879+#include <UbuntuToolkit/private/livetimer_p.h>
4880
4881 UT_NAMESPACE_BEGIN
4882
4883@@ -31,8 +31,8 @@
4884 inline bool isLocale12h(void)
4885 {
4886 QString strTimeFormat = QLocale::system().timeFormat();
4887- QStringList includes; includes << "AP"; includes << "ap";
4888- QStringList excludes; excludes << "H"; excludes << "HH";
4889+ QStringList includes; includes << QStringLiteral("AP"); includes << QStringLiteral("ap");
4890+ QStringList excludes; excludes << QStringLiteral("H"); excludes << QStringLiteral("HH");
4891
4892 Q_FOREACH(const QString& exclude, excludes) {
4893 if (strTimeFormat.contains(exclude)) {
4894
4895=== renamed directory 'src/Ubuntu/Components/tools' => 'src/UbuntuToolkit/tools'
4896=== modified file 'src/UbuntuToolkit/tree.cpp'
4897--- src/Ubuntu/UbuntuToolkit/tree.cpp 2016-07-07 07:21:48 +0000
4898+++ src/UbuntuToolkit/tree.cpp 2016-09-27 15:29:21 +0000
4899@@ -16,8 +16,8 @@
4900
4901 #include "tree_p.h"
4902
4903-#include <private/qobject_p.h>
4904-#include <QQmlEngine>
4905+#include <QtCore/private/qobject_p.h>
4906+#include <QtQml/QQmlEngine>
4907
4908 UT_NAMESPACE_BEGIN
4909
4910
4911=== modified file 'src/UbuntuToolkit/tree_p.h'
4912--- src/Ubuntu/UbuntuToolkit/tree_p.h 2016-07-07 07:21:48 +0000
4913+++ src/UbuntuToolkit/tree_p.h 2016-09-27 15:29:21 +0000
4914@@ -14,12 +14,13 @@
4915 * along with this program. If not, see <http://www.gnu.org/licenses/>.
4916 */
4917
4918-#ifndef TREE_H
4919-#define TREE_H
4920-
4921-#include <QObject>
4922-#include <QVariant>
4923-#include "ubuntutoolkitglobal.h"
4924+#ifndef TREE_P_H
4925+#define TREE_P_H
4926+
4927+#include <QtCore/QObject>
4928+#include <QtCore/QVariant>
4929+
4930+#include <UbuntuToolkit/ubuntutoolkitglobal.h>
4931
4932 UT_NAMESPACE_BEGIN
4933
4934@@ -45,4 +46,4 @@
4935
4936 UT_NAMESPACE_END
4937
4938-#endif // TREE_H
4939+#endif // TREE_P_H
4940
4941=== modified file 'src/UbuntuToolkit/ubuntutoolkitglobal.h'
4942--- src/Ubuntu/UbuntuToolkit/ubuntutoolkitglobal.h 2016-07-08 14:28:48 +0000
4943+++ src/UbuntuToolkit/ubuntutoolkitglobal.h 2016-09-27 15:29:21 +0000
4944@@ -13,12 +13,13 @@
4945 * You should have received a copy of the GNU Lesser General Public License
4946 * along with this program. If not, see <http://www.gnu.org/licenses/>.
4947 */
4948+
4949 #ifndef UBUNTUTOOLKITGLOBAL_H
4950 #define UBUNTUTOOLKITGLOBAL_H
4951
4952 #include <QtCore/QtGlobal>
4953
4954-#if defined(UBUNTUTOOLKIT_LIBRARY)
4955+#if defined(QT_BUILD_UBUNTUTOOLKIT_LIB)
4956 # define UBUNTUTOOLKIT_EXPORT Q_DECL_EXPORT
4957 #else
4958 # define UBUNTUTOOLKIT_EXPORT Q_DECL_IMPORT
4959@@ -54,4 +55,3 @@
4960 #endif
4961
4962 #endif // UBUNTUTOOLKITGLOBAL_H
4963-
4964
4965=== modified file 'src/UbuntuToolkit/ubuntutoolkitmodule.cpp'
4966--- src/Ubuntu/UbuntuToolkit/ubuntutoolkitmodule.cpp 2016-08-26 12:03:35 +0000
4967+++ src/UbuntuToolkit/ubuntutoolkitmodule.cpp 2016-09-27 15:29:21 +0000
4968@@ -17,94 +17,93 @@
4969 */
4970
4971 #include "ubuntutoolkitmodule.h"
4972+
4973+#include <sys/types.h>
4974+#include <unistd.h>
4975+
4976+#include <stdexcept>
4977+
4978+#include <QtQml/QQmlContext>
4979 #include <QtQml/QQmlEngine>
4980-#include <QtQml/QQmlContext>
4981 #include <QtQml/QQmlExtensionPlugin>
4982 #include <QtQuick/private/qquickimagebase_p.h>
4983-#include <QDBusConnection>
4984+#include <QtDBus/QDBusConnection>
4985 #include <QtGui/QGuiApplication>
4986 #include <QtGui/QScreen>
4987-
4988-#include <sys/types.h>
4989-#include <unistd.h>
4990-#include <stdexcept>
4991-
4992-#include <ucunits_p.h>
4993-#include <quickutils_p.h>
4994-#include <i18n_p.h>
4995-#include <ucapplication_p.h>
4996-#include <ucfontutils_p.h>
4997-#include <uctheme_p.h>
4998-#include <ucdeprecatedtheme_p.h>
4999-#include <listener_p.h>
5000-#include <ucfontutils_p.h>
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to status/vote changes: