Age | Commit message (Collapse) | Author |
|
The cmake file now takes a QT_VERSION string setting. The first
character of the string is “6”, then cmake calls find_package
on Qt6…otherwise, it calls find_package on Qt5.
Qt 6.5.2 builds added to the GitHub Actions build matrix.
|
|
|
|
|
|
QTextStream::setCodec() is no longer a thing in Qt6. Most of
our call are to set the codec to UTF-8, which happens to be the
default encoding in Qt6. So make a macro so this can compile
in both Qt5 and Qt6.
|
|
I think these changes would still be fine in Qt5, but
are required for Qt6.
Also DataLocation was deprecated in v6, AppLocalDataLocation
is the same for both Qt5 and Qt6.
|
|
|
|
Some of the signals we’re using aren’t supported or working
in Qt 6. Refactor for things that are working and
documented.
|
|
|
|
* Remove deprecated Ubuntu, add new Ubuntu
* Fix usage of action/cache
* Remove Appveyor
* Update .gitignore for clangd cache
|
|
|
|
|
|
Travis has been throwing a lot of false failures on the Mac build, which was
always super-slow anyway. And now it's been suggested that Travis ain't gonna
last in the open-source-free-for-use CI business. So out it goes.
In its place, GitHub Actions. Just one for now, which runs the build on
pushes to master and on PRs (I hope...haven't tested the PR bit yet).
Notes about the new system...
* It uses the cmake build. Next step...document the cmake system and
de-document the qmake system.
* It tests against both Qt 5.12.0 and 5.15.1.
* Mac, Windows (x64, x86) and Linux (Ubuntu 18.04, 20.04)
* On Linux, it also builds clang and g++.
* In all of the above cases, it's just pretty much default compilers. Which
is probably good...particularly on Linux, where it's not so common for
non-developers to be running major compiler updates.
* All cmake builds use ninja and cache their Qt downloads, so the result is
fairly fast.
* No builds of makegaddag, gaddagize, makeminidawg, iotest, or encodeleaves
yet, as I haven't migrated those to cmake. Need to get on that.
|
|
Generator::filterOutDuplicatePlays was using the Move::usedTiles()
which fails to different between uses of a blank as different letters.
|
|
|
|
|
|
|
|
|
|
|
|
* Replace std::random_shuffle() with std::shuffle().
* Populate switch statements which were checking the
Move enums, but not Move::PlaceError.
* endl -> Qt::endl for QTextStream usage.
* QString::SkipEmptyParts -> Qt::SkipEmptyParts
* QLabel::pixmap() now takes Qt::ReturnByValue
* Use QElapsedTimer where appropriate.
|
|
Apparently, when you serialize a pixmap through a QDataStream(), it loses
track of its devicePixelRatio setting. End rule was that if, on a HiDpi
screen, you dragged and dropped a tile within the rack, you'd get a tile that
was larger than it should have been by a factor of the default pixel ratio.
Solution is to simply reapply the pixel ratio to the newly created Pixmap
after deserializing it in the drag-drop code.
|
|
If a play was made from tiles not on the rack, it brings up the
"Verify Play" dialog, to which one of the options is to cancel the
play. But canceling the play didn't work. Now it does.
|
|
|
|
|
|
|
|
|
|
swig has a problem with non-copyable objects being moved in and out of
containers; we can bypass the problem with SimmedMoveMessage by simply
not generating bindings for the relevant methods.
|
|
When I refactored the simming loop in Simulator::simulateOnePosition() using
a ranged for, I mis-translated the value of the playerNumber variable.
This resulted in the results of some plays being double-weighted.
This fixes a bug where a 2-ply sim on the opening rack ACINPU? will favor
non-bingo plays like UP or CUP rather than bingo plays like PANICUm or
PUrANIC. The Championship Player uses a 2-ply sim, so the Championship Player
could make some bone-headed plays with this regression.
|
|
Rereleasing with just a couple of bug fixes, and may need to be able
to tell the difference between releases in the wild.
|
|
QPixmap is still in actual pixels, so it needs to be created
at devicePixelRatio() times its present size, in addition to
having its own devicePixelRatio() set.
|
|
Hopefully, this fixes crashes some users are seeing.
|
|
|
|
Also, switch to Inno Setup 6.
|
|
|
|
|
|
|
|
|
|
When reading, leave ISO-8859-1 as the default, and only change stream encoding if #character-encoding present. When writing, set encoding to UTF-8 and write #character-encoding pragma at the top of the .gcg file.
|
|
Also, fix cmake macOS build to configure the icon.
|
|
There's only two distinct superleaves files, but there were
more copies in the layout and it's a huge file. Now, lexica
beginning with the text "csw" will fall back to the strategy files
in the "csw" directory before going to default_english. And so,
the Collins superleaves is in strategy/csw and other dictionaries
default directly to strategy/default_english.
Also clean up dupes of other files which didn't take much space,
but at least it clarifies what strategy files are unique.
Minor change to the C++ code to detect the "csw" directory.
|
|
Qt 5.6.
|
|
Turns out that the C++ PRNGs aren't thread-safe. So lock
calls to m_mersenneTwisterRng. Makes Thread Sanitizer happy.
|
|
Defaults to two threads right now. This
can be changed in the Simulator constructor
for the time being. An interface will be
added for this soon.
For an example I tried, I got the following times on 500 simulations in a
macOS release build:
* Quackle 1.0.3 - 26 seconds
* master branch, 1 thread - 27 seconds
* master branch, 2 threads - 19 seconds
* master branch, 4 threads - 15 seconds
This isn't the most efficient use of threads.
It distributes all of the plays being simmed
into a thread pool, but only for one simulation.
Then it comes up for air and tries again.
This was the easiest to implement robustly
given the current architecture.
|
|
|
|
Remove unneeded constructors and use
member initializers for Move, MoveList.
|
|
The code running the simulation is now
disconnected from the Simulation class,
with appropriate members being copied into
a SimmedMoveConstants field (read-only,
thread-safe) and a SimmedMoveMessage
(the class for communicating per-sim data
to and from external threads).
The newly added static function,
Simulate::simulateOnePosition(), should now
be thread-safe and usable as a run function
for a thread.
|
|
Break out things that are effectively constant
into a separate struct so we don't have to
keep initializing them. Also, ensure that all
of the things I forgot are abstracted so I
can break out the per-move simulation into
a different function.
|
|
|
|
In prep for allowing sims to be handed off to a thread
pool.
|
|
I may add it back later as an option.
|
|
Seems that, unless you tell it to specifically, Qt insists on dealing
with physical pixels instead of screen-scaled coordinates. So, i.e.,
on my 200%-scaled HiDpi display, everything was looking pretty small.
|