Skip to content

Commit a9e47f4

Browse files
committed
Version added to GUI
1 parent 6099730 commit a9e47f4

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

src/CMake/Modules/Version.cc.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
DEALINGS IN THE SOFTWARE.
2727
*/
2828

29-
#include <Core/Application/version.h>
29+
#include <Core/Application/Version.h>
3030

31-
const std::string GIT_VERSION_TAG = "@VERSION_TAG@";
32-
const std::string GIT_COMMIT_SHA = "@VERSION_HASHVAR@";
31+
const std::string VersionInfo::GIT_VERSION_TAG = "@VERSION_TAG@";
32+
const std::string VersionInfo::GIT_COMMIT_SHA = "@VERSION_HASHVAR@";

src/Core/Application/Application.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ std::string Application::commandHelpString() const
173173

174174
std::string Application::version() const
175175
{
176-
return GIT_VERSION_TAG.empty() ? "5.0.0 developer version" : GIT_VERSION_TAG;
176+
return VersionInfo::GIT_VERSION_TAG.empty() ? "5.0.0 developer version" : VersionInfo::GIT_VERSION_TAG;
177177
}
178178

179179
boost::filesystem::path Application::configDirectory() const

src/Core/Application/Version.h

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,19 @@
2424
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2525
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2626
DEALINGS IN THE SOFTWARE.
27-
*/
27+
*/
2828

2929
#ifndef SCIRUN_GIT_VERSION_H
3030
#define SCIRUN_GIT_VERSION_H
3131

3232
#include <string>
33-
34-
extern const std::string GIT_VERSION_TAG;
35-
extern const std::string GIT_COMMIT_SHA;
33+
#include <Core/Application/share.h>
34+
35+
class SCISHARE VersionInfo
36+
{
37+
public:
38+
static const std::string GIT_VERSION_TAG;
39+
static const std::string GIT_COMMIT_SHA;
40+
};
3641

3742
#endif

src/Interface/Application/SCIRunMainWindow.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
#include <Core/Application/Application.h>
5959
#include <Core/Application/Preferences/Preferences.h>
6060
#include <Core/Logging/Log.h>
61+
#include <Core/Application/Version.h>
6162

6263
#include <Dataflow/Serialization/Network/XMLSerializer.h>
6364
#include <Dataflow/Serialization/Network/NetworkDescriptionSerialization.h>
@@ -296,6 +297,8 @@ SCIRunMainWindow::SCIRunMainWindow() : firstTimePythonShown_(true)
296297

297298
hideNonfunctioningWidgets();
298299

300+
statusBar()->addPermanentWidget(new QLabel("Version: " + QString::fromStdString(VersionInfo::GIT_VERSION_TAG)));
301+
299302
//parseStyleXML();
300303
}
301304

0 commit comments

Comments
 (0)