Skip to content

Commit 670dbca

Browse files
committed
timeline: Rename qt_log2() to qt_log()
1 parent fb6d787 commit 670dbca

File tree

3 files changed

+17
-21
lines changed

3 files changed

+17
-21
lines changed

src/timeline/app.js

Lines changed: 4 additions & 4 deletions
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_log2("INFO", "Qt Ready");
43+
timeline.qt_log("INFO", "Qt Ready");
4444

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

@@ -72,7 +72,7 @@ $(document).ready(function () {
7272
body_object.keydown(function (event) {
7373
if (event.which === 16) {
7474
if (timeline) {
75-
timeline.qt_log2("DEBUG", "Shift pressed!");
75+
timeline.qt_log("DEBUG", "Shift pressed!");
7676
}
7777
body_object.scope().shift_pressed = true;
7878
}
@@ -81,7 +81,7 @@ $(document).ready(function () {
8181
body_object.keyup(function (event) {
8282
if (event.which === 16) {
8383
if (timeline) {
84-
timeline.qt_log2("DEBUG", "Shift released!");
84+
timeline.qt_log("DEBUG", "Shift released!");
8585
}
8686
body_object.scope().shift_pressed = false;
8787
}

src/timeline/js/controllers.js

Lines changed: 12 additions & 12 deletions
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_log2("DEBUG", "$scope.Qt = true;");
80+
timeline.qt_log("DEBUG", "$scope.Qt = true;");
8181
timeline.page_ready();
8282
};
8383

8484
$scope.setThumbAddress = function (url) {
8585
$scope.ThumbServer = url;
86-
timeline.qt_log2("DEBUG", "setThumbAddress: " + url);
86+
timeline.qt_log("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_log2("DEBUG", existing_thumb_path);
321+
timeline.qt_log("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_log2("DEBUG", "Audio data successful set on clip JSON");
335+
timeline.qt_log("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_log2("DEBUG", "$scope.showClipMenu");
645+
timeline.qt_log("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_log2("DEBUG", "$scope.showEffectMenu");
654+
timeline.qt_log("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_log2("DEBUG", "$scope.showTransitionMenu");
662+
timeline.qt_log("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_log2("DEBUG", "$scope.showTrackMenu");
671+
timeline.qt_log("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_log2("DEBUG", "$scope.showMarkerMenu");
679+
timeline.qt_log("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_log2("DEBUG", "$scope.showPlayheadMenu");
687+
timeline.qt_log("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_log2("DEBUG", "updateLayerIndex");
910+
timeline.qt_log("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_log2("DEBUG", "sortItems");
942+
timeline.qt_log("DEBUG", "sortItems");
943943

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

src/windows/views/timeline_webview.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2718,12 +2718,8 @@ def removeSelection(self, item_id, item_type):
27182718
# Remove from main window
27192719
self.window.removeSelection(item_id, item_type)
27202720

2721-
@pyqtSlot(str)
2722-
def qt_log(self, message=None):
2723-
log.info(message)
2724-
27252721
@pyqtSlot(str, str)
2726-
def qt_log2(self, level="INFO", message=None):
2722+
def qt_log(self, level="INFO", message=None):
27272723
levels = {
27282724
"DEBUG": logging.DEBUG,
27292725
"INFO": logging.INFO,

0 commit comments

Comments
 (0)