| 25 | } |
| 26 | |
| 27 | CFileCommanderViewerPlugin::WindowPtr<CPluginWindow> CTextViewerPlugin::viewFile(const QString& fileName) |
| 28 | { |
| 29 | QMainWindow * mainWindow = WidgetUtils::findTopLevelWindow(); |
| 30 | |
| 31 | auto window = WindowPtr<CTextViewerWindow>::create(mainWindow); // Temporary workaround for https://bugreports.qt.io/browse/QTBUG-61213 |
| 32 | if (!window->loadTextFile(fileName)) |
| 33 | { |
| 34 | window.reset(); |
| 35 | } |
| 36 | |
| 37 | return window; |
| 38 | } |
| 39 | |
| 40 | QString CTextViewerPlugin::name() const |
| 41 | { |
nothing calls this directly
no test coverage detected