OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkDebuggerGUI.h" | 8 #include "SkDebuggerGUI.h" |
9 #include "SkPicture.h" | 9 #include "SkPicture.h" |
10 #include <QListWidgetItem> | 10 #include <QListWidgetItem> |
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 // check if a file has been removed | 655 // check if a file has been removed |
656 for (int i = fDirectoryWidget.count() - 1; i >= 0; i--) { | 656 for (int i = fDirectoryWidget.count() - 1; i >= 0; i--) { |
657 QListWidgetItem* item = fDirectoryWidget.item(i); | 657 QListWidgetItem* item = fDirectoryWidget.item(i); |
658 if (!files.contains(item->text())) { | 658 if (!files.contains(item->text())) { |
659 fDirectoryWidget.removeItemWidget(item); | 659 fDirectoryWidget.removeItemWidget(item); |
660 delete item; | 660 delete item; |
661 } | 661 } |
662 } | 662 } |
663 | 663 |
664 // add any new files | 664 // add any new files |
665 foreach (QString f, files) { | 665 Q_FOREACH (QString f, files) { |
666 if (f.contains(r) && fDirectoryWidget.findItems(f, Qt::MatchExactly).siz
e() == 0) { | 666 if (f.contains(r) && fDirectoryWidget.findItems(f, Qt::MatchExactly).siz
e() == 0) { |
667 fDirectoryWidget.addItem(f); | 667 fDirectoryWidget.addItem(f); |
668 } | 668 } |
669 } | 669 } |
670 } | 670 } |
671 | 671 |
672 void SkDebuggerGUI::loadPicture(const SkString& fileName) { | 672 void SkDebuggerGUI::loadPicture(const SkString& fileName) { |
673 fFileName = fileName; | 673 fFileName = fileName; |
674 fLoading = true; | 674 fLoading = true; |
675 SkAutoTDelete<SkStream> stream(new SkFILEStream(fileName.c_str())); | 675 SkAutoTDelete<SkStream> stream(new SkFILEStream(fileName.c_str())); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 fCanvasWidget.drawTo(fPausedRow); | 795 fCanvasWidget.drawTo(fPausedRow); |
796 } else { | 796 } else { |
797 fCanvasWidget.drawTo(fListWidget.currentRow()); | 797 fCanvasWidget.drawTo(fListWidget.currentRow()); |
798 } | 798 } |
799 } | 799 } |
800 | 800 |
801 void SkDebuggerGUI::updateHit(int newHit) { | 801 void SkDebuggerGUI::updateHit(int newHit) { |
802 fCommandHitBox.setText(QString::number(newHit)); | 802 fCommandHitBox.setText(QString::number(newHit)); |
803 } | 803 } |
804 | 804 |
OLD | NEW |