mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
Move bundled cty.dat from resources FS to installation data dir
This file is only used at start up so there is little point to keeping it in program memory.
This commit is contained in:
parent
7eb229ecde
commit
f7377e686f
@ -748,7 +748,6 @@ set (all_C_and_CXXSRCS
|
||||
)
|
||||
|
||||
set (TOP_LEVEL_RESOURCES
|
||||
cty.dat
|
||||
icons/Darwin/wsjtx.iconset/icon_128x128.png
|
||||
contrib/gpl-v3-logo.svg
|
||||
artwork/splash.png
|
||||
@ -1574,6 +1573,7 @@ install (FILES
|
||||
)
|
||||
|
||||
install (FILES
|
||||
cty.dat
|
||||
contrib/Ephemeris/JPLEPH
|
||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}
|
||||
#COMPONENT runtime
|
||||
|
@ -319,12 +319,12 @@ AD1CCty::AD1CCty (Configuration const * configuration)
|
||||
{
|
||||
Q_ASSERT (configuration);
|
||||
// TODO: G4WJS - consider doing the following asynchronously to
|
||||
// speed up startup. Not urgent as it takes less than 1s on a Core
|
||||
// speed up startup. Not urgent as it takes less than 0.5s on a Core
|
||||
// i7 reading BIG CTY.DAT.
|
||||
QDir dataPath {QStandardPaths::writableLocation (QStandardPaths::DataLocation)};
|
||||
m_->path_ = dataPath.exists (file_name)
|
||||
? dataPath.absoluteFilePath (file_name) // user override
|
||||
: QString {":/"} + file_name; // or original in the resources FS
|
||||
: configuration->data_dir ().absoluteFilePath (file_name); // or original
|
||||
QFile file {m_->path_};
|
||||
if (file.open (QFile::ReadOnly))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user