ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #04569
[Merge] lp:~nik90/ubuntu-clock-app/backend-plugins-rename into lp:ubuntu-clock-app
Nekhelesh Ramananthan has proposed merging lp:~nik90/ubuntu-clock-app/backend-plugins-rename into lp:ubuntu-clock-app.
Requested reviews:
Nekhelesh Ramananthan (nik90)
For more details, see:
https://code.launchpad.net/~nik90/ubuntu-clock-app/backend-plugins-rename/+merge/269089
Rename backend plugins as we discussed
--
Your team Ubuntu Clock Developers is subscribed to branch lp:ubuntu-clock-app.
=== modified file 'app/alarm/AlarmSettingsPage.qml'
--- app/alarm/AlarmSettingsPage.qml 2015-08-14 05:34:49 +0000
+++ app/alarm/AlarmSettingsPage.qml 2015-08-25 16:14:16 +0000
@@ -18,8 +18,8 @@
import QtQuick 2.4
import QtQuick.Layouts 1.1
-import DateTime 1.0
-import Alarm.Settings 1.0
+import Clock 1.0
+import Alarm 1.0
import Ubuntu.Components 1.2
import "../components"
@@ -41,8 +41,8 @@
id: localTimeSource
}
- AlarmSettings {
- id: alarmSettings
+ Settings {
+ id: settings
}
ListModel {
@@ -110,10 +110,10 @@
minimumValue: 1
maximumValue: 100
- value: alarmSettings.volume
+ value: settings.volume
onValueChanged: {
- alarmSettings.volume = formatValue(value)
+ settings.volume = formatValue(value)
}
}
}
@@ -123,7 +123,7 @@
listViewHeight: units.gu(28)
text: i18n.tr("Alarm stops after")
- subText: i18n.tr("%1 minute", "%1 minutes", alarmSettings.duration).arg(alarmSettings.duration)
+ subText: i18n.tr("%1 minute", "%1 minutes", settings.duration).arg(settings.duration)
model: durationModel
@@ -145,12 +145,12 @@
width: units.gu(2)
height: width
name: "ok"
- visible: alarmSettings.duration === duration
+ visible: settings.duration === duration
}
}
onClicked: {
- alarmSettings.duration = duration
+ settings.duration = duration
_alarmDuration.expanded = false
}
}
@@ -161,7 +161,7 @@
listViewHeight: units.gu(28)
text: i18n.tr("Snooze for")
- subText: i18n.tr("%1 minute", "%1 minutes", alarmSettings.snoozeDuration).arg(alarmSettings.snoozeDuration)
+ subText: i18n.tr("%1 minute", "%1 minutes", settings.snoozeDuration).arg(settings.snoozeDuration)
model: snoozeModel
@@ -183,12 +183,12 @@
width: units.gu(2)
height: width
name: "ok"
- visible: alarmSettings.snoozeDuration === duration
+ visible: settings.snoozeDuration === duration
}
}
onClicked: {
- alarmSettings.snoozeDuration = duration
+ settings.snoozeDuration = duration
_alarmSnooze.expanded = false
}
}
@@ -214,12 +214,12 @@
verticalCenter: parent.verticalCenter
}
- checked: alarmSettings.vibration === "pulse"
+ checked: settings.vibration === "pulse"
onCheckedChanged: {
if(checked) {
- alarmSettings.vibration = "pulse"
+ settings.vibration = "pulse"
} else {
- alarmSettings.vibration = "none"
+ settings.vibration = "none"
}
}
}
=== modified file 'app/alarm/AlarmSound.qml'
--- app/alarm/AlarmSound.qml 2015-08-24 15:08:21 +0000
+++ app/alarm/AlarmSound.qml 2015-08-25 16:14:16 +0000
@@ -17,7 +17,7 @@
*/
import QtQuick 2.4
-import Clock.Utility 1.0
+import Alarm 1.0
import QtMultimedia 5.0
import Ubuntu.Content 1.1
import Ubuntu.Components 1.2
@@ -152,7 +152,7 @@
}
}
- AlarmSound {
+ Sound {
id: alarmSoundHelper
}
=== modified file 'app/alarm/EditAlarmPage.qml'
--- app/alarm/EditAlarmPage.qml 2015-08-25 11:39:19 +0000
+++ app/alarm/EditAlarmPage.qml 2015-08-25 16:14:16 +0000
@@ -17,8 +17,8 @@
*/
import QtQuick 2.4
-import DateTime 1.0
-import Clock.Utility 1.0
+import Clock 1.0
+import Alarm 1.0
import Ubuntu.Components 1.2
import Qt.labs.folderlistmodel 2.1
import Ubuntu.Components.Pickers 1.0
@@ -228,7 +228,7 @@
folder: alarmSoundHelper.customAlarmSoundDirectory
}
- AlarmSound {
+ Sound {
id: alarmSoundHelper
}
=== modified file 'app/clock/ClockPage.qml'
--- app/clock/ClockPage.qml 2015-08-17 14:09:09 +0000
+++ app/clock/ClockPage.qml 2015-08-25 16:14:16 +0000
@@ -20,7 +20,7 @@
import U1db 1.0 as U1db
import QtPositioning 5.2
import Ubuntu.Components 1.2
-import GeoLocation 1.0
+import Clock 1.0
import "../components"
import "../worldclock"
=== modified file 'app/ubuntu-clock-app.qml'
--- app/ubuntu-clock-app.qml 2015-08-24 15:08:21 +0000
+++ app/ubuntu-clock-app.qml 2015-08-25 16:14:16 +0000
@@ -17,9 +17,9 @@
*/
import QtQuick 2.4
-import DateTime 1.0
+import Clock 1.0
import U1db 1.0 as U1db
-import Clock.Utility 1.0
+import Alarm 1.0
import Ubuntu.Components 1.2
import "components"
@@ -83,7 +83,7 @@
updateInterval: 1000
}
- AlarmSound {
+ Sound {
id: alarmSoundHelper
// Create CustomSounds directory if it does not exist on app startup
Component.onCompleted: createCustomAlarmSoundDirectory()
=== modified file 'app/worldclock/UserWorldCityList.qml'
--- app/worldclock/UserWorldCityList.qml 2015-08-17 12:27:20 +0000
+++ app/worldclock/UserWorldCityList.qml 2015-08-25 16:14:16 +0000
@@ -17,7 +17,7 @@
*/
import QtQuick 2.4
-import Timezone 1.0
+import Clock 1.0
import U1db 1.0 as U1db
import Ubuntu.Components 1.2
=== modified file 'app/worldclock/WorldCityList.qml'
--- app/worldclock/WorldCityList.qml 2015-08-14 05:34:49 +0000
+++ app/worldclock/WorldCityList.qml 2015-08-25 16:14:16 +0000
@@ -17,7 +17,7 @@
*/
import QtQuick 2.4
-import Timezone 1.0
+import Clock 1.0
import Ubuntu.Components 1.2
import "../components"
import "../upstreamcomponents"
=== modified file 'backend/CMakeLists.txt'
--- backend/CMakeLists.txt 2015-08-24 15:08:21 +0000
+++ backend/CMakeLists.txt 2015-08-25 16:14:16 +0000
@@ -8,36 +8,21 @@
)
set(
- timezone_SRCS
- modules/Timezone/backend.cpp
- modules/Timezone/timezonemodel.cpp
- modules/Timezone/generictimezonemodel.cpp
- modules/Timezone/jsontimezonemodel.cpp
- modules/Timezone/statictimezonemodel.cpp
-)
-
-set(
- datetime_SRCS
- modules/DateTime/backend.cpp
- modules/DateTime/datetime.cpp
-)
-
-set(
- alarmsettings_SRCS
- modules/Alarm/Settings/backend.cpp
- modules/Alarm/Settings/alarmsettings.cpp
-)
-
-set(
- geolocation_SRCS
- modules/GeoLocation/backend.cpp
- modules/GeoLocation/geolocation.cpp
-)
-
-set(
- clockutility_SRCS
- modules/Clock/Utility/backend.cpp
- modules/Clock/Utility/alarmsound.cpp
+ alarm_SRCS
+ modules/Alarm/backend.cpp
+ modules/Alarm/settings.cpp
+ modules/Alarm/sound.cpp
+)
+
+set(
+ clock_SRCS
+ modules/Clock/backend.cpp
+ modules/Clock/geolocation.cpp
+ modules/Clock/datetime.cpp
+ modules/Clock/timezonemodel.cpp
+ modules/Clock/generictimezonemodel.cpp
+ modules/Clock/jsontimezonemodel.cpp
+ modules/Clock/statictimezonemodel.cpp
)
set(
@@ -46,84 +31,42 @@
modules/Stopwatch/LapHistory/history.cpp
)
-add_library(timezone MODULE
- ${timezone_SRCS}
-)
-
-add_library(datetime MODULE
- ${datetime_SRCS}
-)
-
-add_library(alarmsettings MODULE
- ${alarmsettings_SRCS}
-)
-
-add_library(geolocation MODULE
- ${geolocation_SRCS}
-)
-
-add_library(clockutility MODULE
- ${clockutility_SRCS}
+add_library(alarm MODULE
+ ${alarm_SRCS}
+)
+
+add_library(clock MODULE
+ ${clock_SRCS}
)
add_library(stopwatchlaphistory MODULE
${stopwatchlaphistory_SRCS}
)
-set_target_properties(timezone PROPERTIES
- LIBRARY_OUTPUT_DIRECTORY Timezone
-)
-
-set_target_properties(datetime PROPERTIES
- LIBRARY_OUTPUT_DIRECTORY DateTime
-)
-
-set_target_properties(alarmsettings PROPERTIES
- LIBRARY_OUTPUT_DIRECTORY Alarm/Settings
-)
-
-set_target_properties(geolocation PROPERTIES
- LIBRARY_OUTPUT_DIRECTORY GeoLocation
-)
-
-set_target_properties(clockutility PROPERTIES
- LIBRARY_OUTPUT_DIRECTORY Clock/Utility
+set_target_properties(alarm PROPERTIES
+ LIBRARY_OUTPUT_DIRECTORY Alarm
+)
+
+set_target_properties(clock PROPERTIES
+ LIBRARY_OUTPUT_DIRECTORY Clock
)
set_target_properties(stopwatchlaphistory PROPERTIES
LIBRARY_OUTPUT_DIRECTORY Stopwatch/LapHistory
)
-qt5_use_modules(datetime Gui Qml Quick)
-qt5_use_modules(timezone Gui Qml Quick)
-qt5_use_modules(alarmsettings Gui Qml Quick DBus)
-qt5_use_modules(geolocation Gui Qml Quick)
-qt5_use_modules(clockutility Qml)
+qt5_use_modules(alarm Gui Qml Quick DBus)
+qt5_use_modules(clock Gui Qml Quick)
qt5_use_modules(stopwatchlaphistory Qml)
# Copy qmldir file to build dir for running in QtCreator
-add_custom_target(timezone-qmldir ALL
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/modules/Timezone/qmldir ${CMAKE_CURRENT_BINARY_DIR}/Timezone
- DEPENDS ${QMLFILES}
-)
-
-add_custom_target(datetime-qmldir ALL
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/modules/DateTime/qmldir ${CMAKE_CURRENT_BINARY_DIR}/DateTime
- DEPENDS ${QMLFILES}
-)
-
-add_custom_target(alarmsettings-qmldir ALL
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/modules/Alarm/Settings/qmldir ${CMAKE_CURRENT_BINARY_DIR}/Alarm/Settings
- DEPENDS ${QMLFILES}
-)
-
-add_custom_target(geolocation-qmldir ALL
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/modules/GeoLocation/qmldir ${CMAKE_CURRENT_BINARY_DIR}/GeoLocation
- DEPENDS ${QMLFILES}
-)
-
-add_custom_target(clockutility-qmldir ALL
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/modules/Clock/Utility/qmldir ${CMAKE_CURRENT_BINARY_DIR}/Clock/Utility
+add_custom_target(alarm-qmldir ALL
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/modules/Alarm/qmldir ${CMAKE_CURRENT_BINARY_DIR}/Alarm
+ DEPENDS ${QMLFILES}
+)
+
+add_custom_target(clock-qmldir ALL
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/modules/Clock/qmldir ${CMAKE_CURRENT_BINARY_DIR}/Clock
DEPENDS ${QMLFILES}
)
@@ -133,20 +76,11 @@
)
# Install plugin file
-install(TARGETS timezone DESTINATION ${MODULE_PATH}/Timezone/)
-install(FILES modules/Timezone/qmldir DESTINATION ${MODULE_PATH}/Timezone/)
-
-install(TARGETS datetime DESTINATION ${MODULE_PATH}/DateTime/)
-install(FILES modules/DateTime/qmldir DESTINATION ${MODULE_PATH}/DateTime/)
-
-install(TARGETS alarmsettings DESTINATION ${MODULE_PATH}/Alarm/Settings/)
-install(FILES modules/Alarm/Settings/qmldir DESTINATION ${MODULE_PATH}/Alarm/Settings/)
-
-install(TARGETS geolocation DESTINATION ${MODULE_PATH}/GeoLocation/)
-install(FILES modules/GeoLocation/qmldir DESTINATION ${MODULE_PATH}/GeoLocation/)
-
-install(TARGETS clockutility DESTINATION ${MODULE_PATH}/Clock/Utility/)
-install(FILES modules/Clock/Utility/qmldir DESTINATION ${MODULE_PATH}/Clock/Utility/)
+install(TARGETS alarm DESTINATION ${MODULE_PATH}/Alarm/)
+install(FILES modules/Alarm/qmldir DESTINATION ${MODULE_PATH}/Alarm/)
+
+install(TARGETS clock DESTINATION ${MODULE_PATH}/Clock/)
+install(FILES modules/Clock/qmldir DESTINATION ${MODULE_PATH}/Clock/)
install(TARGETS stopwatchlaphistory DESTINATION ${MODULE_PATH}/Stopwatch/LapHistory/)
install(FILES modules/Stopwatch/LapHistory/qmldir DESTINATION ${MODULE_PATH}/Stopwatch/LapHistory/)
=== removed directory 'backend/modules/Alarm/Settings'
=== renamed file 'backend/modules/Alarm/Settings/backend.cpp' => 'backend/modules/Alarm/backend.cpp'
--- backend/modules/Alarm/Settings/backend.cpp 2015-08-14 05:34:49 +0000
+++ backend/modules/Alarm/backend.cpp 2015-08-25 16:14:16 +0000
@@ -19,13 +19,15 @@
#include <QtQml>
#include <QtQml/QQmlContext>
#include "backend.h"
-#include "alarmsettings.h"
+#include "settings.h"
+#include "sound.h"
void BackendPlugin::registerTypes(const char *uri)
{
- Q_ASSERT(uri == QLatin1String("Alarm.Settings"));
+ Q_ASSERT(uri == QLatin1String("Alarm"));
- qmlRegisterType<AlarmSettings>(uri, 1, 0, "AlarmSettings");
+ qmlRegisterType<Settings>(uri, 1, 0, "Settings");
+ qmlRegisterType<Sound>(uri, 1, 0, "Sound");
}
void BackendPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
=== renamed file 'backend/modules/Alarm/Settings/backend.h' => 'backend/modules/Alarm/backend.h'
=== renamed file 'backend/modules/Alarm/Settings/qmldir' => 'backend/modules/Alarm/qmldir'
--- backend/modules/Alarm/Settings/qmldir 2014-07-17 10:38:36 +0000
+++ backend/modules/Alarm/qmldir 2015-08-25 16:14:16 +0000
@@ -1,2 +1,2 @@
-module Alarm.Settings
-plugin alarmsettings
+module Alarm
+plugin alarm
=== renamed file 'backend/modules/Alarm/Settings/alarmsettings.cpp' => 'backend/modules/Alarm/settings.cpp'
--- backend/modules/Alarm/Settings/alarmsettings.cpp 2015-08-14 05:34:49 +0000
+++ backend/modules/Alarm/settings.cpp 2015-08-25 16:14:16 +0000
@@ -19,9 +19,9 @@
#include <QDebug>
#include <QtDBus>
-#include "alarmsettings.h"
+#include "settings.h"
-AlarmSettings::AlarmSettings(QObject *parent):
+Settings::Settings(QObject *parent):
QObject(parent)
{
// On startup, retrieve all the settings values from Dbus
@@ -37,7 +37,7 @@
SLOT(onSettingsChanged(QString, QVariantMap, QStringList)));
}
-void AlarmSettings::onSettingsChanged(const QString &interface,
+void Settings::onSettingsChanged(const QString &interface,
const QVariantMap &properties,
const QStringList & /*valid*/)
{
@@ -87,7 +87,7 @@
}
}
-void AlarmSettings::refreshProperties()
+void Settings::refreshProperties()
{
QDBusInterface handlerPropertiesInterface
("com.canonical.indicator.datetime",
@@ -111,7 +111,7 @@
m_vibration = map["HapticFeedback"].toString();
}
-void AlarmSettings::setDBusProperty(const QString &name, const QVariant &value)
+void Settings::setDBusProperty(const QString &name, const QVariant &value)
{
QDBusInterface handlerPropertiesInterface
("com.canonical.indicator.datetime",
@@ -125,27 +125,27 @@
QVariant::fromValue(QDBusVariant(value)));
}
-int AlarmSettings::volume() const
+int Settings::volume() const
{
return m_volume;
}
-int AlarmSettings::duration() const
+int Settings::duration() const
{
return m_duration;
}
-int AlarmSettings::snoozeDuration() const
+int Settings::snoozeDuration() const
{
return m_snoozeDuration;
}
-QString AlarmSettings::vibration() const
+QString Settings::vibration() const
{
return m_vibration;
}
-void AlarmSettings::setVolume(int volume)
+void Settings::setVolume(int volume)
{
if(m_volume == volume) {
// Don't send the volume over dbus if it is the same one already
@@ -159,7 +159,7 @@
setDBusProperty("DefaultVolume", QVariant(m_volume));
}
-void AlarmSettings::setDuration(int duration)
+void Settings::setDuration(int duration)
{
if(m_duration == duration) {
// Don't send the duration over dbus if it is the same one already
@@ -173,7 +173,7 @@
setDBusProperty("Duration", QVariant(m_duration));
}
-void AlarmSettings::setSnoozeDuration(int snoozeDuration)
+void Settings::setSnoozeDuration(int snoozeDuration)
{
if(m_snoozeDuration == snoozeDuration) {
// Don't send the snooze duration over dbus if it is the same one already
@@ -187,7 +187,7 @@
setDBusProperty("SnoozeDuration", QVariant(m_snoozeDuration));
}
-void AlarmSettings::setVibration(QString vibration)
+void Settings::setVibration(QString vibration)
{
if(m_vibration == vibration) {
// Don't send the vibration mode over dbus if it is the same one already
=== renamed file 'backend/modules/Alarm/Settings/alarmsettings.h' => 'backend/modules/Alarm/settings.h'
--- backend/modules/Alarm/Settings/alarmsettings.h 2015-08-14 05:34:49 +0000
+++ backend/modules/Alarm/settings.h 2015-08-25 16:14:16 +0000
@@ -16,13 +16,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef ALARMSETTINGS_H
-#define ALARMSETTINGS_H
+#ifndef SETTINGS_H
+#define SETTINGS_H
#include <QObject>
#include <QVariant>
-class AlarmSettings: public QObject
+class Settings: public QObject
{
Q_OBJECT
@@ -51,7 +51,7 @@
NOTIFY vibrationChanged)
public:
- AlarmSettings(QObject *parent = 0);
+ Settings(QObject *parent = 0);
// Function to return the alarm volume
int volume() const;
=== renamed file 'backend/modules/Clock/Utility/alarmsound.cpp' => 'backend/modules/Alarm/sound.cpp'
--- backend/modules/Clock/Utility/alarmsound.cpp 2015-08-24 21:15:05 +0000
+++ backend/modules/Alarm/sound.cpp 2015-08-25 16:14:16 +0000
@@ -20,21 +20,21 @@
#include <QFileInfo>
#include <QStandardPaths>
-#include "alarmsound.h"
+#include "sound.h"
-AlarmSound::AlarmSound(QObject *parent):
+Sound::Sound(QObject *parent):
QObject(parent),
m_customAlarmDir(QStandardPaths::standardLocations(QStandardPaths::AppDataLocation).first() + "/CustomSounds/"),
m_defaultAlarmDir("/usr/share/sounds/ubuntu/ringtones/")
{
}
-QString AlarmSound::customAlarmSoundDirectory() const
+QString Sound::customAlarmSoundDirectory() const
{
return m_customAlarmDir;
}
-void AlarmSound::deleteCustomAlarmSound(const QString &soundName)
+void Sound::deleteCustomAlarmSound(const QString &soundName)
{
QDir dir(m_customAlarmDir);
if (dir.exists(soundName))
@@ -43,14 +43,14 @@
}
}
-void AlarmSound::prepareToAddAlarmSound(const QString &soundPath)
+void Sound::prepareToAddAlarmSound(const QString &soundPath)
{
QFileInfo soundFile(soundPath);
QString soundFileName = soundFile.fileName();
deleteCustomAlarmSound(soundFileName);
}
-void AlarmSound::createCustomAlarmSoundDirectory()
+void Sound::createCustomAlarmSoundDirectory()
{
QDir dir(m_customAlarmDir);
@@ -62,7 +62,7 @@
dir.mkpath(m_customAlarmDir);
}
-bool AlarmSound::isAlarmSoundValid(const QString &soundFileName)
+bool Sound::isAlarmSoundValid(const QString &soundFileName)
{
QFileInfo soundFile;
@@ -82,18 +82,18 @@
}
}
-bool AlarmSound::isAlarmSoundValid(const QUrl &soundUrl)
+bool Sound::isAlarmSoundValid(const QUrl &soundUrl)
{
QFileInfo soundFile;
return soundFile.exists(soundUrl.path());
}
-QString AlarmSound::getDefaultAlarmSoundPath(const QString &soundFileName) const
+QString Sound::getDefaultAlarmSoundPath(const QString &soundFileName) const
{
return m_defaultAlarmDir + soundFileName;
}
-QString AlarmSound::getSoundName(const QString &soundPath) const
+QString Sound::getSoundName(const QString &soundPath) const
{
QFileInfo soundFile(soundPath);
return soundFile.baseName();
=== renamed file 'backend/modules/Clock/Utility/alarmsound.h' => 'backend/modules/Alarm/sound.h'
--- backend/modules/Clock/Utility/alarmsound.h 2015-08-24 16:32:44 +0000
+++ backend/modules/Alarm/sound.h 2015-08-25 16:14:16 +0000
@@ -16,13 +16,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef ALARMSOUND_H
-#define ALARMSOUND_H
+#ifndef SOUND_H
+#define SOUND_H
#include <QObject>
#include <QUrl>
-class AlarmSound: public QObject
+class Sound: public QObject
{
Q_OBJECT
@@ -32,7 +32,7 @@
CONSTANT)
public:
- AlarmSound(QObject *parent = 0);
+ Sound(QObject *parent = 0);
QString customAlarmSoundDirectory() const;
=== removed directory 'backend/modules/Clock/Utility'
=== renamed file 'backend/modules/Clock/Utility/backend.cpp' => 'backend/modules/Clock/backend.cpp'
--- backend/modules/Clock/Utility/backend.cpp 2015-08-24 15:08:21 +0000
+++ backend/modules/Clock/backend.cpp 2015-08-25 16:14:16 +0000
@@ -19,13 +19,22 @@
#include <QtQml>
#include <QtQml/QQmlContext>
#include "backend.h"
-#include "alarmsound.h"
+#include "geolocation.h"
+#include "datetime.h"
+#include "timezonemodel.h"
+#include "generictimezonemodel.h"
+#include "jsontimezonemodel.h"
+#include "statictimezonemodel.h"
void BackendPlugin::registerTypes(const char *uri)
{
- Q_ASSERT(uri == QLatin1String("Clock.Utility"));
+ Q_ASSERT(uri == QLatin1String("Clock"));
- qmlRegisterType<AlarmSound>(uri, 1, 0, "AlarmSound");
+ qmlRegisterType<GeoLocation>(uri, 1, 0, "GeoLocation");
+ qmlRegisterType<DateTime>(uri, 1, 0, "DateTime");
+ qmlRegisterType<GenericTimeZoneModel>(uri, 1, 0, "GenericTimeZoneModel");
+ qmlRegisterType<JsonTimeZoneModel>(uri, 1, 0, "JsonTimeZoneModel");
+ qmlRegisterType<StaticTimeZoneModel>(uri, 1, 0, "StaticTimeZoneModel");
}
void BackendPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
=== renamed file 'backend/modules/Clock/Utility/backend.h' => 'backend/modules/Clock/backend.h'
=== renamed file 'backend/modules/DateTime/datetime.cpp' => 'backend/modules/Clock/datetime.cpp'
=== renamed file 'backend/modules/DateTime/datetime.h' => 'backend/modules/Clock/datetime.h'
=== renamed file 'backend/modules/Timezone/generictimezonemodel.cpp' => 'backend/modules/Clock/generictimezonemodel.cpp'
=== renamed file 'backend/modules/Timezone/generictimezonemodel.h' => 'backend/modules/Clock/generictimezonemodel.h'
=== renamed file 'backend/modules/GeoLocation/geolocation.cpp' => 'backend/modules/Clock/geolocation.cpp'
=== renamed file 'backend/modules/GeoLocation/geolocation.h' => 'backend/modules/Clock/geolocation.h'
=== renamed file 'backend/modules/Timezone/jsontimezonemodel.cpp' => 'backend/modules/Clock/jsontimezonemodel.cpp'
=== renamed file 'backend/modules/Timezone/jsontimezonemodel.h' => 'backend/modules/Clock/jsontimezonemodel.h'
=== renamed file 'backend/modules/Clock/Utility/qmldir' => 'backend/modules/Clock/qmldir'
--- backend/modules/Clock/Utility/qmldir 2015-08-19 13:29:52 +0000
+++ backend/modules/Clock/qmldir 2015-08-25 16:14:16 +0000
@@ -1,2 +1,2 @@
-module Clock.Utility
-plugin clockutility
+module Clock
+plugin clock
=== renamed file 'backend/modules/Timezone/statictimezonemodel.cpp' => 'backend/modules/Clock/statictimezonemodel.cpp'
=== renamed file 'backend/modules/Timezone/statictimezonemodel.h' => 'backend/modules/Clock/statictimezonemodel.h'
=== renamed file 'backend/modules/Timezone/timezonemodel.cpp' => 'backend/modules/Clock/timezonemodel.cpp'
=== renamed file 'backend/modules/Timezone/timezonemodel.h' => 'backend/modules/Clock/timezonemodel.h'
=== removed directory 'backend/modules/DateTime'
=== removed file 'backend/modules/DateTime/backend.cpp'
--- backend/modules/DateTime/backend.cpp 2015-08-14 05:34:49 +0000
+++ backend/modules/DateTime/backend.cpp 1970-01-01 00:00:00 +0000
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2014-2015 Canonical Ltd
- *
- * This file is part of Ubuntu Clock App
- *
- * Ubuntu Clock App is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
- *
- * Ubuntu Clock App is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <QtQml>
-#include <QtQml/QQmlContext>
-#include "backend.h"
-#include "datetime.h"
-
-void BackendPlugin::registerTypes(const char *uri)
-{
- Q_ASSERT(uri == QLatin1String("DateTime"));
-
- qmlRegisterType<DateTime>(uri, 1, 0, "DateTime");
-}
-
-void BackendPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
-{
- QQmlExtensionPlugin::initializeEngine(engine, uri);
-}
=== removed file 'backend/modules/DateTime/backend.h'
--- backend/modules/DateTime/backend.h 2015-08-14 05:34:49 +0000
+++ backend/modules/DateTime/backend.h 1970-01-01 00:00:00 +0000
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2014-2015 Canonical Ltd
- *
- * This file is part of Ubuntu Clock App
- *
- * Ubuntu Clock App is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
- *
- * Ubuntu Clock App is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef BACKEND_PLUGIN_H
-#define BACKEND_PLUGIN_H
-
-#include <QtQml/QQmlEngine>
-#include <QtQml/QQmlExtensionPlugin>
-
-class BackendPlugin : public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
-
-public:
- void registerTypes(const char *uri);
- void initializeEngine(QQmlEngine *engine, const char *uri);
-};
-#endif // BACKEND_PLUGIN_H
-
=== removed file 'backend/modules/DateTime/qmldir'
--- backend/modules/DateTime/qmldir 2014-07-26 09:34:15 +0000
+++ backend/modules/DateTime/qmldir 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-module DateTime
-plugin datetime
=== removed directory 'backend/modules/GeoLocation'
=== removed file 'backend/modules/GeoLocation/backend.cpp'
--- backend/modules/GeoLocation/backend.cpp 2015-08-14 05:34:49 +0000
+++ backend/modules/GeoLocation/backend.cpp 1970-01-01 00:00:00 +0000
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2014-2015 Canonical Ltd
- *
- * This file is part of Ubuntu Clock App
- *
- * Ubuntu Clock App is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
- *
- * Ubuntu Clock App is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <QtQml>
-#include <QtQml/QQmlContext>
-#include "backend.h"
-#include "geolocation.h"
-
-void BackendPlugin::registerTypes(const char *uri)
-{
- Q_ASSERT(uri == QLatin1String("GeoLocation"));
-
- qmlRegisterType<GeoLocation>(uri, 1, 0, "GeoLocation");
-}
-
-void BackendPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
-{
- QQmlExtensionPlugin::initializeEngine(engine, uri);
-}
=== removed file 'backend/modules/GeoLocation/backend.h'
--- backend/modules/GeoLocation/backend.h 2015-08-14 05:34:49 +0000
+++ backend/modules/GeoLocation/backend.h 1970-01-01 00:00:00 +0000
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2014-2015 Canonical Ltd
- *
- * This file is part of Ubuntu Clock App
- *
- * Ubuntu Clock App is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
- *
- * Ubuntu Clock App is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef BACKEND_PLUGIN_H
-#define BACKEND_PLUGIN_H
-
-#include <QtQml/QQmlEngine>
-#include <QtQml/QQmlExtensionPlugin>
-
-class BackendPlugin : public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
-
-public:
- void registerTypes(const char *uri);
- void initializeEngine(QQmlEngine *engine, const char *uri);
-};
-#endif // BACKEND_PLUGIN_H
-
=== removed file 'backend/modules/GeoLocation/qmldir'
--- backend/modules/GeoLocation/qmldir 2014-11-04 15:58:05 +0000
+++ backend/modules/GeoLocation/qmldir 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-module GeoLocation
-plugin geolocation
=== removed directory 'backend/modules/Timezone'
=== removed file 'backend/modules/Timezone/backend.cpp'
--- backend/modules/Timezone/backend.cpp 2015-08-14 05:34:49 +0000
+++ backend/modules/Timezone/backend.cpp 1970-01-01 00:00:00 +0000
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2014-2015 Canonical Ltd
- *
- * This file is part of Ubuntu Clock App
- *
- * Ubuntu Clock App is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
- *
- * Ubuntu Clock App is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <QtQml>
-#include <QtQml/QQmlContext>
-#include "backend.h"
-#include "timezonemodel.h"
-#include "generictimezonemodel.h"
-#include "jsontimezonemodel.h"
-#include "statictimezonemodel.h"
-
-void BackendPlugin::registerTypes(const char *uri)
-{
- Q_ASSERT(uri == QLatin1String("Timezone"));
-
- qmlRegisterType<GenericTimeZoneModel>(uri, 1, 0, "GenericTimeZoneModel");
- qmlRegisterType<JsonTimeZoneModel>(uri, 1, 0, "JsonTimeZoneModel");
- qmlRegisterType<StaticTimeZoneModel>(uri, 1, 0, "StaticTimeZoneModel");
-}
-
-void BackendPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
-{
- QQmlExtensionPlugin::initializeEngine(engine, uri);
-}
=== removed file 'backend/modules/Timezone/backend.h'
--- backend/modules/Timezone/backend.h 2015-08-14 05:34:49 +0000
+++ backend/modules/Timezone/backend.h 1970-01-01 00:00:00 +0000
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2014-2015 Canonical Ltd
- *
- * This file is part of Ubuntu Clock App
- *
- * Ubuntu Clock App is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
- *
- * Ubuntu Clock App is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef BACKEND_PLUGIN_H
-#define BACKEND_PLUGIN_H
-
-#include <QtQml/QQmlEngine>
-#include <QtQml/QQmlExtensionPlugin>
-
-class BackendPlugin : public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
-
-public:
- void registerTypes(const char *uri);
- void initializeEngine(QQmlEngine *engine, const char *uri);
-};
-#endif // BACKEND_PLUGIN_H
-
=== removed file 'backend/modules/Timezone/qmldir'
--- backend/modules/Timezone/qmldir 2014-07-17 10:38:36 +0000
+++ backend/modules/Timezone/qmldir 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-module Timezone
-plugin timezone
=== modified file 'tests/unit/MockClockApp.qml'
--- tests/unit/MockClockApp.qml 2015-08-17 12:27:20 +0000
+++ tests/unit/MockClockApp.qml 2015-08-25 16:14:16 +0000
@@ -17,7 +17,7 @@
*/
import QtQuick 2.4
-import DateTime 1.0
+import Clock 1.0
import U1db 1.0 as U1db
import Ubuntu.Components 1.2
import "../../app"
=== modified file 'tests/unit/tst_alarm.qml'
--- tests/unit/tst_alarm.qml 2015-08-12 16:57:29 +0000
+++ tests/unit/tst_alarm.qml 2015-08-25 16:14:16 +0000
@@ -17,7 +17,7 @@
*/
import QtQuick 2.4
-import DateTime 1.0
+import Clock 1.0
import Ubuntu.Components 1.2
import "../../app/alarm"
References