mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-05 03:03:20 +00:00
Change 'File' concept to a 'Resource' abstract concept
This commit is contained in:
parent
7eb54cddce
commit
ca34562a1c
23 changed files with 447 additions and 351 deletions
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include "TasksFile.h"
|
||||
#include "core/BaseFileResource.h"
|
||||
|
||||
QString QMLTasksFile::getName()
|
||||
{
|
||||
|
@ -13,5 +14,9 @@ QString QMLTasksFile::getName()
|
|||
|
||||
QString QMLTasksFile::getPath()
|
||||
{
|
||||
return QString::fromStdString(tasksFile->getPath());
|
||||
auto fileResource = dynamic_cast<mirai::BaseFileResource *>(tasksFile);
|
||||
if (!fileResource) {
|
||||
return "";
|
||||
}
|
||||
return QString::fromStdString(fileResource->getPath());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue