Skip to content

Commit

Permalink
Add a dataref for build date
Browse files Browse the repository at this point in the history
  • Loading branch information
leecbaker committed Jan 15, 2021
1 parent f20844f commit 5691276
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/plugin/drt_datarefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ DRTDatarefs::DRTDatarefs()
setAutoReloadPlugins(b);
}
)
, build_date("leecbaker/datareftool/build_date", []() -> std::string {
return std::string(__DATE__ " " __TIME__);
})
, toggle_debug("leecbaker/datareftool/debug_toggle", "Toggle debug mode", []() {
plugin->setDebugMode(!getDebugMode());
return true;
Expand Down
2 changes: 2 additions & 0 deletions src/plugin/drt_datarefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class DRTDatarefs {
DatarefProvider<bool> impersonate_dre;
DatarefProvider<bool> auto_reload_plugins;

DatarefProvider<std::string> build_date;

CommandProvider toggle_debug;
CommandProvider toggle_impersonate_dre;
CommandProvider toggle_auto_reload_plugins;
Expand Down
2 changes: 1 addition & 1 deletion src/plugin/ui/about_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ AboutWindow::AboutWindow() {
text << "\n";
text << "https://datareftool.com\n";
text << "\n";
text << "Compiled at " << __DATE__ << " " << __TIME__ << "\n";
text << "Compiled at " __DATE__ " " __TIME__ "\n";
text << "\n";
text << "(c) 2014-2021 Lee C. Baker";

Expand Down

0 comments on commit 5691276

Please sign in to comment.