Changelog for 0.0.8
[harmattan/cameraplus] / declarative / videoresolutionmodel.cpp
index d7aefe8..1cd0981 100644 (file)
@@ -1,7 +1,7 @@
 /*!
  * This file is part of CameraPlus.
  *
- * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -98,12 +98,27 @@ void VideoResolutionModel::setAspectRatio(const QString& aspectRatio) {
 
     m_aspectRatio = aspectRatio;
 
-    emit aspectRatioChanged();
-
     beginResetModel();
 
     m_resolutions = m_settings->resolutions(m_aspectRatio);
 
     endResetModel();
+
+    emit aspectRatioChanged();
+    emit countChanged();
   }
 }
+
+int VideoResolutionModel::count() const {
+  return rowCount();
+}
+
+#if defined(QT5)
+QHash<int, QByteArray> VideoResolutionModel::roleNames() const {
+  return m_roles;
+}
+
+void VideoResolutionModel::setRoleNames(const QHash<int, QByteArray>& roles) {
+  m_roles = roles;
+}
+#endif