Skip to content

Commit 6a566d8

Browse files
committed
Timeline: Sprinkle "DEBUG" log level liberally
- Every JS log message is made "DEBUG" except for two, which are kept as "INFO": "QT Ready" and "Angular ready"
1 parent e4b3e74 commit 6a566d8

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/timeline/app.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ $(document).ready(function () {
4040
// Check for Qt Integration
4141
new QWebChannel(qt.webChannelTransport, function (channel) {
4242
timeline = channel.objects.timeline;
43-
timeline.qt_log("Qt Ready");
43+
timeline.qt_log2("INFO", "Qt Ready");
4444

4545
// Only enable Qt once Angular as initialized
4646
angular.element(document).ready(function () {
47-
timeline.qt_log("Angular Ready");
47+
timeline.qt_log2("INFO", "Angular Ready");
4848
body_object.scope().enableQt();
4949
});
5050

src/timeline/js/controllers.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ App.controller("TimelineCtrl", function ($scope) {
7777
$scope.Qt = false;
7878
$scope.enableQt = function () {
7979
$scope.Qt = true;
80-
timeline.qt_log("$scope.Qt = true;");
80+
timeline.qt_log2("DEBUG", "$scope.Qt = true;");
8181
timeline.page_ready();
8282
};
8383

8484
$scope.setThumbAddress = function (url) {
8585
$scope.ThumbServer = url;
86-
timeline.qt_log("setThumbAddress: " + url);
86+
timeline.qt_log2("DEBUG", "setThumbAddress: " + url);
8787
};
8888

8989
// Move the playhead to a specific time
@@ -318,7 +318,7 @@ App.controller("TimelineCtrl", function ($scope) {
318318
// Append cache buster, since QtWebEngine seems to aggressively cache images
319319
existing_thumb_path += "?" + Math.random();
320320

321-
timeline.qt_log(existing_thumb_path);
321+
timeline.qt_log2("DEBUG", existing_thumb_path);
322322
clip_selector.attr("src", existing_thumb_path);
323323
};
324324

@@ -332,7 +332,7 @@ App.controller("TimelineCtrl", function ($scope) {
332332
$scope.project.clips[clip_index].audio_data = audio_data;
333333
$scope.project.clips[clip_index].show_audio = true;
334334
});
335-
timeline.qt_log("Audio data successful set on clip JSON");
335+
timeline.qt_log2("DEBUG", "Audio data successful set on clip JSON");
336336
break;
337337
}
338338

@@ -642,7 +642,7 @@ App.controller("TimelineCtrl", function ($scope) {
642642
// Show clip context menu
643643
$scope.showClipMenu = function (clip_id, event) {
644644
if ($scope.Qt && !$scope.enable_razor) {
645-
timeline.qt_log("$scope.showClipMenu");
645+
timeline.qt_log2("DEBUG", "$scope.showClipMenu");
646646
$scope.selectClip(clip_id, false, event);
647647
timeline.ShowClipMenu(clip_id);
648648
}
@@ -651,15 +651,15 @@ App.controller("TimelineCtrl", function ($scope) {
651651
// Show clip context menu
652652
$scope.showEffectMenu = function (effect_id) {
653653
if ($scope.Qt && !$scope.enable_razor) {
654-
timeline.qt_log("$scope.showEffectMenu");
654+
timeline.qt_log2("DEBUG", "$scope.showEffectMenu");
655655
timeline.ShowEffectMenu(effect_id);
656656
}
657657
};
658658

659659
// Show transition context menu
660660
$scope.showTransitionMenu = function (tran_id, event) {
661661
if ($scope.Qt && !$scope.enable_razor) {
662-
timeline.qt_log("$scope.showTransitionMenu");
662+
timeline.qt_log2("DEBUG", "$scope.showTransitionMenu");
663663
$scope.selectTransition(tran_id, false, event);
664664
timeline.ShowTransitionMenu(tran_id);
665665
}
@@ -668,23 +668,23 @@ App.controller("TimelineCtrl", function ($scope) {
668668
// Show track context menu
669669
$scope.showTrackMenu = function (layer_id) {
670670
if ($scope.Qt && !$scope.enable_razor) {
671-
timeline.qt_log("$scope.showTrackMenu");
671+
timeline.qt_log2("DEBUG", "$scope.showTrackMenu");
672672
timeline.ShowTrackMenu(layer_id);
673673
}
674674
};
675675

676676
// Show marker context menu
677677
$scope.showMarkerMenu = function (marker_id) {
678678
if ($scope.Qt && !$scope.enable_razor) {
679-
timeline.qt_log("$scope.showMarkerMenu");
679+
timeline.qt_log2("DEBUG", "$scope.showMarkerMenu");
680680
timeline.ShowMarkerMenu(marker_id);
681681
}
682682
};
683683

684684
// Show playhead context menu
685685
$scope.showPlayheadMenu = function (position) {
686686
if ($scope.Qt && !$scope.enable_razor) {
687-
timeline.qt_log("$scope.showPlayheadMenu");
687+
timeline.qt_log2("DEBUG", "$scope.showPlayheadMenu");
688688
timeline.ShowPlayheadMenu(position);
689689
}
690690
};
@@ -907,7 +907,7 @@ App.controller("TimelineCtrl", function ($scope) {
907907
$scope.updateLayerIndex = function () {
908908

909909
if ($scope.Qt) {
910-
timeline.qt_log("updateLayerIndex");
910+
timeline.qt_log2("DEBUG", "updateLayerIndex");
911911
}
912912

913913
var scrolling_tracks = $("#scrolling_tracks");
@@ -939,7 +939,7 @@ App.controller("TimelineCtrl", function ($scope) {
939939
}
940940

941941
if ($scope.Qt) {
942-
timeline.qt_log("sortItems");
942+
timeline.qt_log2("DEBUG", "sortItems");
943943

944944
$scope.$evalAsync(function () {
945945
// Sort by position second

0 commit comments

Comments
 (0)