-void YT3::testResponse(QNetworkReply *reply) {
- int status = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
+const VideoDefinition &YT3::maxVideoDefinition() {
+ const QString name = QSettings().value("definition", "720p").toString();
+ const VideoDefinition &definition = VideoDefinition::forName(name);
+ return definition;
+}
+
+void YT3::setMaxVideoDefinition(const QString &name) {
+ QSettings settings;
+ settings.setValue("definition", name);
+ emit maxVideoDefinitionChanged(name);
+}
+
+void YT3::testResponse(const HttpReply &reply) {
+ int status = reply.statusCode();