Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Sep 1, 2019
1 parent dc583c8 commit 6d9f8b8
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 16 deletions.
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/ui/widgets/homeitemwidget.cpp
Expand Up @@ -180,7 +180,7 @@ DE_GUI_PIMPL(HomeItemWidget)
if (buttonsShown)
{
labelRightMargin->set(*buttonsWidth,
labelRightMargin->animation().done()? TimeSpan(0.4) :
labelRightMargin->animation().done()? 400_ms :
labelRightMargin->animation().remainingTime());
}
}
Expand Down
6 changes: 3 additions & 3 deletions doomsday/libs/core/include/de/core/app.h
Expand Up @@ -89,9 +89,9 @@ class DE_PUBLIC App : DE_OBSERVES(Clock, TimeChange)
*/
DE_DEFINE_AUDIENCE2(StartupComplete, void appStartupCompleted())

static const char *ORG_NAME; ///< Name of the author/organization.
static const char *ORG_DOMAIN; ///< Network domain of the author/organization.
static const char *APP_NAME; ///< Name of the application, as presented to humans.
static const char *ORG_NAME; ///< Name of the author/organization.
static const char *ORG_DOMAIN; ///< Network domain of the author/organization.
static const char *APP_NAME; ///< Name of the application, as presented to humans.
static const char *APP_VERSION; ///< Version of the application.
static const char *CONFIG_PATH;
static const char *UNIX_HOME;
Expand Down
3 changes: 1 addition & 2 deletions doomsday/libs/core/include/de/filesys/archiveentryfile.h
Expand Up @@ -25,7 +25,6 @@
namespace de {

class Archive;
class ArchiveFolder;

/**
* Accesses data of an entry within an archive.
Expand All @@ -44,7 +43,7 @@ class DE_PUBLIC ArchiveEntryFile : public ByteArrayFile
*/
ArchiveEntryFile(String const &name, Archive &archive, String const &entryPath);

~ArchiveEntryFile();
~ArchiveEntryFile() override;

String describe() const override;
String entryPath() const;
Expand Down
2 changes: 1 addition & 1 deletion doomsday/libs/core/include/de/filesys/folder.h
Expand Up @@ -87,7 +87,7 @@ class DE_PUBLIC Folder : public File
};

public:
explicit Folder(String const &name = String());
explicit Folder(String const &name = {});

virtual ~Folder();

Expand Down
2 changes: 1 addition & 1 deletion doomsday/libs/core/include/de/filesys/packageloader.h
Expand Up @@ -21,7 +21,7 @@

#include "../String"
#include "../Package"
#include "../ArchiveFolder"
//#include "../ArchiveFolder"
#include "../FileSystem"
#include "../Hash"

Expand Down
2 changes: 1 addition & 1 deletion doomsday/libs/core/src/core/highperformancetimer.cpp
Expand Up @@ -48,7 +48,7 @@ HighPerformanceTimer::HighPerformanceTimer() : d(new Impl)

TimeSpan HighPerformanceTimer::elapsed() const
{
return TimeSpan(d->milliSeconds() / 1000.0);
return TimeSpan::fromMilliSeconds(d->milliSeconds());
}

Time HighPerformanceTimer::startedAt() const
Expand Down
2 changes: 1 addition & 1 deletion doomsday/libs/core/src/core/timer.cpp
Expand Up @@ -112,7 +112,7 @@ struct TimerScheduler : public Thread, public Lockable
pending.push(
Pending{sc::system_clock::now() + sc::microseconds(dint64(repeatDuration * 1.0e6)),
&timer,
timer.isSingleShot() ? TimeSpan() : repeatDuration});
timer.isSingleShot() ? 0_ms : repeatDuration});
waiter.post();
}

Expand Down
2 changes: 1 addition & 1 deletion doomsday/libs/core/src/filesys/archivefeed.cpp
Expand Up @@ -19,7 +19,7 @@

#include "de/ArchiveFeed"
#include "de/ArchiveEntryFile"
#include "de/ArchiveFolder"
//#include "de/ArchiveFolder"
#include "de/ByteArrayFile"
#include "de/ZipArchive"
#include "de/Writer"
Expand Down
7 changes: 6 additions & 1 deletion doomsday/libs/core/src/filesys/directoryfeed.cpp
Expand Up @@ -132,7 +132,12 @@ Folder *DirectoryFeed::populateSubFolder(const Folder &folder, const String &ent
Folder *subFolder = folder.tryLocate<Folder>(entryName);
if (!subFolder)
{
subFolder = new Folder(entryName.lower());
subFolder = new Folder(entryName);

// Technically folders could be interpreted, but that would require knowing
// their source data at this time, and we only know the file name.
//subFolder = &folder.fileSystem().interpret(subFolder)->as<Folder>();

subFolder->attach(newSubFeed(entryName));
//folder.add(subFolder);
// subFolder = &folder.fileSystem()
Expand Down
9 changes: 7 additions & 2 deletions doomsday/libs/core/src/filesys/filesystem.cpp
Expand Up @@ -21,7 +21,7 @@

#include "de/App"
#include "de/ArchiveFeed"
#include "de/ArchiveFolder"
//#include "de/ArchiveFolder"
#include "de/DirectoryFeed"
#include "de/DictionaryValue"
#include "de/Guard"
Expand Down Expand Up @@ -133,7 +133,12 @@ Folder &FileSystem::makeFolder(String const &path, FolderCreationBehaviors behav

// Folders may be interpreted just like any other file; however, they must
// remain instances derived from Folder.
subFolder = &interpret(new Folder(path.fileName()))->as<Folder>();

// Technically folders could be interpreted, but that would require knowing
// their source data at this time, and we only know the file name.
//subFolder = &interpret())->as<Folder>();

subFolder = new Folder(path.fileName());

// If parent folder is writable, this will be too.
if (parentFolder.mode() & File::Write)
Expand Down
2 changes: 1 addition & 1 deletion doomsday/libs/core/src/filesys/packagefeed.cpp
Expand Up @@ -18,7 +18,7 @@

#include "de/PackageFeed"
#include "de/LinkFile"
#include "de/ArchiveFolder"
//#include "de/ArchiveFolder"
#include "de/PackageLoader"
#include "de/FS"

Expand Down
1 change: 1 addition & 0 deletions doomsday/libs/core/src/filesys/packageloader.cpp
Expand Up @@ -19,6 +19,7 @@
#include "de/PackageLoader"

#include "de/App"
#include "de/ArchiveFolder"
#include "de/CommandLine"
#include "de/Config"
#include "de/DictionaryValue"
Expand Down
1 change: 1 addition & 0 deletions doomsday/libs/doomsday/src/doomsdayapp.cpp
Expand Up @@ -44,6 +44,7 @@
#include "api_uri.h"

#include <de/App>
#include <de/ArchiveFolder>
#include <de/ArchiveFeed>
#include <de/CommandLine>
#include <de/Config>
Expand Down
2 changes: 1 addition & 1 deletion doomsday/tests/test_archive/main.cpp
Expand Up @@ -120,7 +120,7 @@ int main(int argc, char **argv)

LOG_MSG("Before flushing:\n") << app.homeFolder().contentsAsText();

TimeSpan(0.5).sleep(); // make the time difference clearer
(500_ms).sleep(); // make the time difference clearer

// Changes were made to the archive via files. The archive won't be
// written back to its source file until the ArchiveFolder instance
Expand Down

0 comments on commit 6d9f8b8

Please sign in to comment.