Wt Release notes
Wt Release notes
This file lists important notes on migrating existing applications to
newer version of Wt. It lists changes in the library that may break
the way you build Wt, the way you configure Wt or the Wt API and
behaviour.
Release 4.11.1 (November 5, 2024)
Wt 4.11.1 is a patch release that addresses the following issues:
-
Issue #12675:
Add built-in type support for
Dbo::JsonSerializer. This can be activated by including
Wt/Dbo/WtJsonSqlTraits.h
.
-
Issue #13041:
Increase the default number of iteration of
Auth::BCryptHashFunction to 12.
A warning message will also be logged when using Auth::BCryptHashFunction with less than the minumum of 10 iterations that ASVS recommends.
-
Issue #11868:
Added the
WStackedWidget::currentWidgetChanged() signal that is emitted when the
WStackedWidget changes the element that it shows.
-
Issue #13106:
ensure that the correct
disabled
class is used on a per-theme basis. This wrongly affected all Bootstrap themes.
-
Issue #13104:
a Bootstrap 5 WDialog
is now correctly raised to the front when WDialog::raiseToFront()
is called.
-
Issue #12813:
Added the possibility for each column of
WAbstractItemView to be set resizable or not independently using the
WAbstractItemView::setColumnResizeEnabled() function.
-
Issue #11855:
the loading indicator should now be shown directly when the indicator-timeout is set to 0 instead of having a few millisecond delay.
This can be set by the
<application-settings><indicator-timeout>0</indicator-timeout></application-settings>
property in the wt_config.xml
.
-
Issue #7856:
Fix a bug where
change()
and input()
signals would sometimes not be emitted by a
WSlider with native control if progressive bootstrap was enabled.
-
Issue #11001:
Delete the extra space that was sometimes added before the first and after last element of a
WBoxLayout if the spacing was more than twice as big as the margin.
-
Issue #11008:
ensure that a JavaScript variable that retrieves the index of an item in a layout is called correctly.
-
Issue #13115:
Fix a bug where a widget removed from a disabled parent widget and added to a different enabled parent widget would still appear disabled.
-
Issue #12174:
an automated test for Selenium has been added for the widget gallery. This will ensure that for all used widgets, a base case is tested, and JS errors are less likely to be merged.
This is an internal tool, but added to the public repository, as an example. This is likely something many developers would find useful.
Release 4.11.0 (October 1, 2024)
Wt 4.11.0 is a major release. That focuses on authentication and WebSockets.
First Wt is now able to support MFA in its authentication system. It is easily enabled with a single call to AuthService::setMfaProvider(). By default an implementation for TOTP is included. This offers a way to enable an additional layer of security for your applications. Instead of remembering a single password, users can be made to enter a short code that changes often, as an additional authentication step.
Developers are also able to implement this feature in any way they see fit via the interface AbstractMfaProcess. A couple examples are provided in the source code, and the authentication tutorial.
If you like using WebSockets, there is good news! Wt was already able to communicate with its server over WebSockets. This was, however, limited to only its communication for updates regarding its framework. Now you are able to use them in whatever custom way you see fit. Developers can set up endpoints (both session-private or public) that listen to incoming requests. The browser (or another client) can then use those endpoints to connect to said resource. A connection has now been established, and messages can be send back and forth.
New features
-
Issue #11705:
MFA (Multi-Factor Authentication) is now supported by means of a default implementation of TOTP (Time-Based One-Time Password). This feature can be enabled by AuthService::setMfaProvider(), and the length of the expected code can be managed via AuthService::setMFACodeLength().
Once enabled, users are allowed (but not forced) to use MFA. A developer will have to create a way that allows users to set their secret key, or override the functionality that decides whether the MFA step ought to be shown to the user during the login process (AuthModel::hasMfaStep()). Alternatively, they can also set AuthService::setMFARequired() to
true
, which will force all users to have MFA enabled.
If enabled and required, a user will see the TotpProcess when they pass the regular login. This will happen after password login. Developers can use this process to enable MFA on a per-user manner, without globally enforcing it.
This widget shows them a QR code and a secret key initially for them to store in an authenticator app or browser extension. Once stored, it will no longer show them this code or key, unless invalidated (by means of User::removeIdentity(), which will take the same name as the setMfaProvider()
).
The above approach will be the default flow that Wt uses if MFA is enabled (and/or required). Developers are able to provide a custom implementation as well, using the AbstractMfaProcess class. It is encouraged to look at the examples under examples/authentication/mfa
in the source code, to have a concrete idea on how to use the class correctly.
-
Issue #12461:
Developers are now able to connect to a public or private resource using the WebSocket protocol. While WebSockets were already integrated into Wt, they were only used to stream updates between the server and the client as an alternative to long-polling.
Now they can actually be used by developers for custom purposes. The WWebSocketResource is used to create a new endpoint. This can be global (static), when linked to the WServer itself, or session-private (dynamic) when exposed in the WApplication.
When a connection from the client side is established, a WWebSocketConnection is created. This serves as a way to track a singular connection between the server and a client.
Other improvements
-
Issue #10382:
Added customization support for the upload mechanism of
WFileDropWidget.
It is now possible to customize the server-side upload mechanism by returning a custom WResource from
WFileDropWidget::uploadResource()
to be uploaded to.
At the client side, uploading can be modified by setting
wtUseCustomSend
and defining wtCustomSend()
.
-
Issue #12320:
allows for the "Cache-Control" header to be specified for the WServer. This is to be passed as a command-line option when running the
WServer
.
-
Issue #11600:
added unit tests for WFormDelegate classes.
Bug fixes
-
Issue #12367:
Fix a bug where the checkbox in a
WPopupMenu would not be checked if a
WMenuItem was clicked, and not the
WCheckBox or its label. Also fixes a bug where the signal of a
WMenuItem
checkbox would not be emitted after switching between the item being checkable or not.
-
Issue #12676:
although technically an improvement, since it was left for so long, it became a bug with Boost 1.85.0.
The version retired the boost/filesystem/convenience.hpp header. And also removed some deprecated functions.
-
Issue #12737:
cancel every action on a socket before closing it to avoid reading on a closed socket.
-
Issue #12323:
does no longer cause an issue when a WMenu::addSeparator() was added, together with using WBootstrap5Theme.
-
Issue #12366:
Fixed a bug where some
WContainerWidget would send undefined information when TwoPhaseRenderingThreshold was not set to 0.
-
Issue #12538:
correctly implement the RFC5322 specification for mail messages. The "To:" and "Cc:" fields are now correctly placed on a single line. With multiple addresses this results in a comma-separated list of addresses.
-
Issue #9284:
a WTableView will now render more correctly in layouts. A combination of various layouts could lead to the table not setting its size correctly, or even not having a consistent size (apparently randomly deciding
to fill in all available space, or to shrink to fit its content). This led to the issue where scrollbars were sometimes not visible, or were placed in a wrong location. By default, a table will now size correctly, and place the scrollbars accordingly, namely at the edges of its container.
-
Issue #11954:
resolve a fairly big memory leak when using Pango. Pango is a library that is by default enabled (controlled using the
ENABLE_PANGO
build flag). This library is used to generate PDFs with the WPdfRenderer.
The font map that Pango generated to track available fonts was never correctly released. Some other Pango specific objects (resulting from calls to the library), such as the context and fonts were also not always released. These objects are now managed by smart pointers to ensure proper memory management.
A single leak does remain, which seemingly comes from Pango or libfontconfig itself (see: Issue #12844).
Release 4.10.4 (March 6, 2024)
Wt 4.10.4 is a (smaller) patch release that addresses the following issues.
This release is somewhat smaller due to bigger features being in the works.
Developers can expect some bigger new features in the authentication framework soon!
-
Issue #11685:
render child widgets differently when updating an existing widget. The JavaScript code that is being called by the framework to dynamically add children to an HTML element was changed so that it always appends them instead of setting the whole content. This is to avoid a widget that was added in JavaScript (with no C++ counterpart) from being overwritten if the HTML of the parent would be written to.
-
Issue #12283:
this corrects an additional mistake, made on top of Issue #12006.
-
Issue #12145:
a change to the internal enum class Property caused an index and its value to be out of sync for a couple values.
-
Issues #12352:
this corrects a potential crash in Boost spirit, where a grammar parser could encounter a floating point exception, when trying to evaluate unsafe divisions.
Release 4.10.3 (December 20, 2023)
Wt 4.10.3 is a patch release that addresses the following issues:
-
Issue #12158:
this corrects a mistake in Issue #7814, where the cookie path was not correctly set.
-
Issue #11934:
this corrects the rendering of a vertical WSlider for all themes. Additionally an improvement was made that introduces WSlider::setTickLength, that allows users to set the length (width or height of the line, depending on whether the
WSlider
is Orientation::Horizontal
or Orientation::Vertical
) of the ticks.
For the native slider, ticks have also been enabled. Although both the positioning (the side on which ticks are placed) and their length cannot be changed. Only their interval can be manipulated through WSlider::setTickInterval.
-
Issues #12005:
a step value can now be set on a WSlider, using WSlider::setStep.
This functions for both the native and non-native sliders. By default the step value is set to 1.
-
Issue #12022:
solves a case where a JavaScript error can occur if an invisible element on the page receives an update. This is related to Issue #11669.
-
Issue #12148:
attributes on the main page's <html> and <body> tags can now be specified. The new functions are:
-
Issue #12143:
covered an edge case of Issue #12006, that caused JavaScript errors.
-
Issue #12036:
ensures that if a WCheckBox and WRadioButton have a custom style class, it remains in place after applying the WBootstrap5Theme.
-
Issue #11960:
remove an IBPP deprecation warning.
-
Issue #11772:
some warnings in the code were fixed, so that the build process will produce less output, resulting in a cleaner build step.
Release 4.10.2 (November 8, 2023)
Wt 4.10.2 is a patch release that addresses the following issues:
-
Issue #11932:
when calling WPushButton::setMenu after a WPopupMenu had already been added,
the second menu wasn't added to the button, and both
WPopupMenu
s were removed. Now, the new WPopupMenu
is correctly added to the button.
-
Issue #11974: when dynamically making a field visible in FormView the form would only show the label and not the corresponding widget. This has now been corrected by having
FormView
override createFormWidget.
-
Issue #11984:
corrected WTableView's drag & drop functionality. When a WAbstractItemModel's items have the flags for drag & drop enabled (found in ItemFlag), the WAbstractItemView has setDragEnabled(true) and setEnabledDropLocations() set to DropLocation::BetweenRows, the view will now correctly drop the items at the location indicated by the cursor, and will no longer cause an issue when moving the cursor out of the table when dragging.
-
Issue #11890:
if a user were to delete a WPopupWidget, which they can do as detailed in the documentation, they would encounter a use-after-free.
This has been corrected, so that the content of a
WPopupWidget
can be removed when being hidden.
-
Issue #11985:
ensures that if a WStringListModel is used in a WTableView that allows drag & drop, the content of the
model is correctly updated.
-
Issue #12012:
due to an oversight in Issue #10512, the keyboard and mouse events for a WTreeView's node were missing.
Issue #11882:
the fieldset element, used by WGroupBox has been corrected when using Bootstrap 5.
A default HTML value was used here, which caused the content to not be rendered correctly.
-
Issue #12006
a JavaScript error could occur if no semicolon was added to the JS code when called by setJavaScriptMember or callJavaScript.
-
Issue #11897:
fixed a log that was not configurable. The response to a HTTP request was always logged (like
GET /path contentlength
).
All logs should be configurable, hence it is now logged under info:wthttp
.
-
Issue #11959:
the
GetOnePixel
deprecation warning from GraphicsMagick was removed.
-
Issue #7196:
remove a deprecated Pango call. If you compile with Pango enabled, you will no longer see the warning that
pango_fc_font_(un)lock_face
is deprecated.
Release 4.10.1 (September 20, 2023)
Wt 4.10.1 is a patch release that addresses the following issues:
-
Issue #10512:
ensures that the disabled state of any WWebWidget or WCompositeWidget is correctly propagated to its children.
Before, if a user set a widget as disabled that contained children like a WMenu, a new WMenuItem could be added, that was enabled.
For some of the affected widgets, this meant that the new item could not be selected, since the signal was not exposed, but in some cases, like with a
WMenu
this was still possible.
The disabled state of a widget now propagates to its children so that a disabled state can be set consistently for a parent. This doesn't actually set setDisabled() of the children.
This state can be set separately to manage the child's disabled state without regard to its parent.
-
Issue #11804:
the WEmailValidator was corrected. There was a missing case in the client side regex that did not allow a hyphen in the domain of an email address.
The server side regex was correct, but nevertheless the case has been added to the tests.
-
Issue #7645:
a WAnchor loaded through JavaScript, with progressive bootstrap will correctly add an empty "href" attribute.
This allows the item to be selected on the page by pressing the Tab button, allowing keyboard navigation.
-
Issue #11848:
this corrects an edge-case in WSuggestionPopup where forcibly displaying the pop-up via C++ code would cause it to be unfiltered.
-
This is a combination of Issue #9595 and Issue #9596:
where the Postgres backend will again rely on standard library functionality (which was substituted in Issue #9490 for boost::spirit).
This implementation, however, caused the loss of some precision with floats and doubles. The conversion from and to string now happens with the standard library charconv, which is available in C++17 (or in C++14 as an extension).
In case this library is not available, Wt will fall back to std::stof and std::stoi, but will still use
boost::spirit
in case of subnormals (which would result in an out_of_range exception).
-
Issue #11769:
The MySQL backend will now correctly catch the ER_CLIENT_INTERACTION_TIMEOUT error.
-
Issue #11302:
when closing a HTTP socket, it was possible that the server just started handling a TCP/SSL request. This resulted in a free-after-use for the listener.
The listener is now first checked, so we do not get this race condition.
-
Issue #11408:
fixed several concurrency issues in the wthttp library.
-
Issue #11852:
the Message's date header was corrected. In case that a localized abbreviation was defined for the month or day, this string was placed in the header.
Some providers / exchanges may reject these emails, since they follow RFC-5322 (see here) and expect English names.
Release 4.10.0 (May 30, 2023)
Wt 4.10.0 mainly features back-end improvements and some new features that provide some convenience.
There were some issues with persisting dates and time in Sqlite3.
In some cases user will have to change some things about their CMake set-up:
If users wish to use OpenGL
, they may need to provide a GLEW
installation with GLEW_ROOT
,
since GLEW
is no longer bundled with Wt.
New features
-
Issue #7279:
added WEmailEdit and
WEmailValidator, implementing
a
<input type="email">
.
-
Issue #8760:
extended Auth::AuthWidget with the option to resend verificiation emails. When email verification is configured to be required and the email somehow got lost, the user would be stuck not being able to log in.
When the user tries to log in now, an info message will be shown saying they need to verify their email first along with a new button to resend the verification email. The user must then enter the email address again in a dialog before the email is sent.
The virtual methods AuthWidget::letResendEmailVerification() and AuthWidget::createResendEmailVerificationView() can be used to customize the UI.
-
Issue #7814:
The
SameSite
attribute of the Set-Cookie
HTTP header is now rendered by Wt. To avoid adding yet another parameter to the WApplication::setCookie()
method, the class Http::Cookie was introduced that allows configuring all cookie attributes using setters. Objects of this type can be passed to the new setCookie() and removeCookie() methods in WApplication
.
Other improvements
-
Issue #11384:
it was possible for
Mail::Client::connect() to
throw an exception if the DNS resolver failed to resolve the SMTP server's hostname. We changed this to
log an error and return
false
instead (as indicated by its documentation).
Mail::Client::send() could
cause a null pointer to be dereferenced, either because a TLS connection was attempted while Wt was
built without OpenSSL, or because the user did not call
Mail::Client::connect() first.
send()
was fixed to log an error and return false
instead.
-
WServer::addResource()
can now take a
shared_ptr
instead of a raw pointer,
enforcing that the resource lives at least as long as the server, unless removed with
WServer::removeEntryPoint().
The overload that takes a raw pointer is now deprecated.
This also fixes issue #11301, where there
could be a use-after-free in test.http
.
-
Issue #11412:
shift-click to open a new window did not work for links to internal paths. Shift-click is now handled by the browser, like ctrl- and meta-click.
-
Issue #11604:
added a virtual destructor to WAbstractFormDelegate
to ensure proper deletion and explicitly removed the copy and move constructor and assignment operator.
-
Issue #11562:
The tutorials
(Wt,
Dbo, and
Auth)
were updated to be built with Asciidoctor instead of the legacy Python implementation,
its style was updated to match the JWt website style, and the text was brought up to
date a bit. The blog example was likewise updated to use Asciidoctor.
-
Issue #11210:
WTable::headerCount()
has been made
const
.
-
The obsolete CMake options
ENABLE_EXT
, WT_NO_STD_LOCALE
and WT_NO_STD_WSTRING
were removed.
Bug fixes
-
Issue #11426:
Sqlite3:
fixed multiple issues with dates and timestamps:
-
Timestamps before 1970 would not be saved properly on Windows, because of limitations
of the
gmtime
function on Windows. The new implementation uses the
date
library instead.
-
There was a bug in the conversion to a date time string if
ISO8601AsText
was set as the
date time storage.
For timestamps before 1970 the millisecond part would be saved as a negative integer, e.g.
December 31, 1969 23:59:59.999 would be saved as
1970-01-01T00:00:00.0-1
instead of 1969-12-31T23:59:59.999
.
-
There was a bug in the conversion to and from Julian days if
JulianDaysAsReal
was set as the
date time storage.
The decimal part was divided by 1000, and it was ahead by 12 hours due to it using
midnight rather than noon 1 January 4713 BCE as the reference timestamp. It is now
consistent with SQLite's own
julianday()
function.
-
There was a bug in the conversion to UNIX timestamps if
UnixTimeAsInteger
was set as the
date time storage.
The date part was discarded, and the time was saved as a number of milliseconds instead of seconds.
-
Issue #11578:
fixed an issue with the Dbo forms not correctly validating
invalid WDate and WTime values
causing the forms to clear the values. Now the forms will give a validation error and prompt the user to
correct it before saving the form.
-
Issue #11377:
when using wtisapi with WebSockets enabled in the
wt_config.xml
, Wt would
try and fail to establish a WebSockets connection (this is not supported by ISAPI). Wt
now disables WebSockets (and notifies this in the logs) when using ISAPI.
-
Issue #11423:
WResource::internalPath()
now returns the empty string for static resources, since it doesn't make sense for static resources.
-
Issue #10485:
fixed an issue where Wt would not build on Apple platforms with
ENABLE_OPENGL=ON
.
This changes the CMake setup, so that we now rely on built-in FindOpenGL and FindGLEW modules.
As a consequence, the bundled GLEW installation was removed. This means that a GLEW installation will need to be
provided when building Wt from source. CMake will find GLEW if it is installed in a standard location.
The GLEW_ROOT
CMake variable can be used if it is installed elsewhere.
-
Issue #11376:
fixed an issue with redirects when using wtfcgi.
Release 4.9.2 (April 18, 2023)
Wt 4.9.2 is a patch release that addresses the following issues:
Release 4.9.1 (January 20, 2023)
Wt 4.9.1 is a patch release that addresses the following issues:
Release 4.9.0 (December 22, 2022)
Wt 4.9.0 features a lot of changes under the hood: we have painstakingly removed jQuery from Wt,
modernized the JavaScript, and added a linter, formatter, and a new minifier in the process.
A more directly noticeable change is the fact that we gave the documentation a new lick of paint using the
Doxygen Awesome theme. Also, now that we added some tooling to customize WBootstrap5Theme, the
widget gallery's
primary color was updated to be more in line with Wt's website.
Backwards incompatible changes
Removal of jQuery
We removed every use of jQuery from Wt, and jQuery is now no longer automatically loaded.
This means that if you relied on the included jQuery version (for example, the $
object or function),
you will have to make some changes to make it work with Wt 4.9.0. There are several options:
-
Replace your uses of jQuery with vanilla JavaScript, which is what we did.
For example, the $
function can often be replaced with
querySelector or
querySelectorAll.
-
Load jQuery yourself using
WApplication::require().
WApplication::requireJQuery()
has been marked as deprecated.
For example:
application->require("https://code.jquery.com/jquery-3.6.1.slim.min.js", "$");
.
-
Change your wt_config.xml
, adding a <head-matter>
section
that loads jQuery through a <script>
tag:
<head-matter>
<script
src="https://code.jquery.com/jquery-3.6.1.slim.min.js"
integrity="sha256-w8CvhFs7iHNVUtnSP0YKEg00p9Ih13rlL9zGqvLdePA="
crossorigin="anonymous"></script>
</head-matter>
Changes to WBootstrap5Theme
- Collapsible panels
-
WBootstrap5Theme
has used an
accordion
instead of a
card
for collapsible panels since its introduction in Wt 4.6.0.
Now, WPanel always uses a
card.
This allows all panels to have a consistent appearance, regardless of whether they can be collapsed or not.
Additionally, the
WPanel::collapse() and
WPanel::expand() functions will now work
as expected with
WBootstrap5Theme.
This change resolves issue #10364.
- Bootstrap 5 theme customization
-
We've made it easier to customize the Bootstrap 5 theme.
WBootstrap5Theme now loads
a single CSS file that is built from
Sass source files. The
custom-bs-theme example shows how this allows the theme to be customized.
The
widget gallery
makes use of this by changing the primary color from Bootstrap's blue to the purple
used in Wt's logo and homepage.
This change resolves issue #9350.
New features
Other improvements
-
Issue #11067:
animateShow() and
animateHide() were overhauled to use the
Web Animations API. This fixes issues with choppy animations.
-
Issue #8629:
In order to ease maintenance, and make contributing to Wt easier, we changed the JavaScript
minifier from the old version of Google Closure compiler we were using to
terser.
-
Issue #10966:
Added a JavaScript formatter to format Wt's JavaScript code.
Its usage is detailed in the Wt source tree at
doc/development/javascript.md
.
-
We gave our reference documentation a new lick of paint: we're now using the
Doxygen Awesome theme,
which also has a dark mode.
-
Whereas trying to construct
UpdateLock with a null
WApplication pointer would cause a null
pointer dereference before, it now simply yields an unsuccessful UpdateLock
(PR #195
by Steven Köhler).
-
Issue #10395:
WPanel::setTitleBar(false)
now automatically calls
WPanel::setCollapsible(false).
-
Issue #9570:
All uses of
WT_CXX14
and WT_CXX14ONLY
were removed in Wt's
source code. WT_CXX14
is now always defined, since Wt requires
C++14. We marked Wt::cpp14::make_unique
as deprecated, since this only
existed because C++11 lacked std::make_unique
.
-
Issue #10924:
The undocumented
split-script
configuration property was removed, simplifying
Wt's internals.
-
Issue #10914:
Changed some Boost.Phoenix includes to silence deprecation warnings.
-
Issue #10911:
Fixed OpenSSL 3.0 deprecation warnings.
-
Issue #9252:
Fixed a deprecation warning in the Pango font support implementation.
Bug fixes
-
Issue #9076:
WDateEdit
gave a javascript error when opening the calendar popup if the
application was rendered in
WidgetSet
mode.
-
Issue #10488:
Long polling requests interrupted on the server side now no longer prevent keep alive requests from being sent,
and thus the session from timing out. This was possible when Wt is deployed behind a reverse proxy that has
a shorter request timeout than the
<server-push-timeout>
configured in wt_config.xml
.
Release 4.8.3 (December 22, 2022)
Wt 4.8.3 is a patch release that addresses the following issues:
-
Issue #11105:
Wt has a built-in redirect mechanism that prevents the
Referer
header from showing
the session id (if the session id is in the URL). This mechanism hashes the destination
URL with a secret to ensure that this system is not used as an
open redirect endpoint.
However, in order to make dedicated session process mode work properly, this secret could be overridden
by providing a Redirect-Secret
header, creating an open redirect endpoint.
We have renamed this header to X-Wt-Redirect-Secret
to better indicate the fact that this
header is nonstandard, and will only accept this header if it is coming from a trusted reverse proxy.
-
Issue #10995:
fixed an issue with WContainerWidget
where a session could terminate with the text "WContainerWidget: error parsing: undefined".
-
Issue #11101:
fixed a data race when using dedicated session processes.
-
Issue #8093:
fixed an issue where the bottom axis could be clipped off of a tall
WCartesianChart
(PR #178 by Apivan Tuntakurn).
Release 4.8.2 (November 4, 2022)
Wt 4.8.2 is a patch release that addresses the following issue:
-
Issue #10970:
Sending an
OPTIONS *
request could cause an assertion failure when trying
to match the request to an entry point. This could cause a crash if assertions are enabled,
though they usually aren't in production builds. Since these types of requests are not properly
supported by wthttp
, OPTIONS *
requests are now rejected.
Release 4.8.1 (September 22, 2022)
As usual, Wt 4.8.1 is a patch release, but we also added a document
clarifying our policy on which minimum versions of libraries Wt requires
(issue #8801).
You can find this document in Wt's source tree at
doc/MinimumDependencyVersions.md
.
That aside, Wt 4.8.1 addresses the following issues:
-
Issue #10909:
WPdfImage: Fixed compatibility with recent libharu
versions (2.4.0 and up, excluding version 2.4.1).
-
Issue #10825:
Fixed an issue in WGoogleMap where some left-over
JavaScript code in
setMapTypeControl
targeting the v2 API would cause a JavaScript error.
-
Issue #10834:
Fixed a regression since Wt 4.8.0 with the tests for
issue #9442,
dbo_test46
would fail with the MySQL/MariaDB and the SQL Server
backends because they sort null values differently from PostgreSQL.
Release 4.8.0 (July 8, 2022)
Wt 4.8.0 doesn't come with any big new features, but it does include some handy new
functions here and there, and some improvements.
We have also removed Skia from Wt because we can use
Direct2D on Windows and GraphicsMagick on every other operating system.
Removals
-
Issue #10254:
The Skia-based WRasterImage implementation has been removed,
since it was unmaintained and dependent on very specific Skia versions, and we have good alternatives
with GraphicsMagick and Direct2D.
Changes in default behavior
-
Notable changes in exception handling:
-
Issue #10137:
Exceptions thrown from
WResource::handleRequest()
are now caught and logged instead of causing a crash.
-
Issue #10136:
Uncaught exceptions emanating from
WApplication::notify()
would be sent to the browser. This exposes potentially sensitive details
about the application to the end user. Wt now just sends a simple
"500 Internal Server Error" without any further details. The exception details
will still be logged.
-
Issue #8660:
The default value of
OAuthService::popupEnabled()
was changed from
true
to false
.
This means that the default method when using OAuth is always to redirect instead of using a popup.
New features
Improvements
-
Issue #10019:
Added a cleaner fix for issue #9922.
Instead of discarding responses containing only
{}
, Wt now no longer delineates its JavaScript
with curly brackets.
-
PR #192:
Removed obsolete
cursor: hand
Bug fixes
-
Issue #9938:
The close icon for a WDialog was displayed on the left side
of the title bar when using bootstrap 5. This was fixed by using the Bootstrap 5 appropriate
<button>
with the btn-close
style class.
A new Wt.WDialog.titlebar
template was introduced so that the rendering
of the title bar can be overridden.
-
Fixed issue #10599:
there were issues on macOS when using a statically built Wt library, causing the linker to output
warnings and some test cases to fail.
-
Fixed issue #10604:
self-assignment of
Wt::Dbo::Query
would lose bound parameters.
-
PR #187:
Negative floating point numbers would always be formatted in scientific notation when
being output as JavaScript. This has been fixed to only use scientific notation for
particularly small or particularly large numbers.
Miscellaneous
-
Issue #10248:
Tabs have been replaced by spaces in the source code. Previously, we had a mix of tabs and spaces,
where newer code used only spaces, and older code changed 8 spaces into a tab.
Release 4.7.3 (July 8, 2022)
Wt 4.7.3 is a patch release that addresses the following issues:
Release 4.7.2 (May 12, 2022)
Wt 4.7.2 is a patch release that addresses the following issues:
-
Issue #10287:
wthttp now properly sends close frame back when WebSocket connections are closed.
Previously, the browser would send a close frame and not get a response back. On Firefox,
these kinds of errors caused the creation of new WebSocket connections to the same
endpoint to be delayed by up to one minute, making it seem like the application is hanging.
-
Issue #10003:
Calling WApplication::refresh()
in the application constructor (e.g. by setting the locale) would produce a JavaScript error if there was
a WSpinBox in the widget tree.
-
Issue #10320:
Version 4.5.2
(issue #9363) and 4.6.2
(issue #9572)
added workarounds to deal with the incorrect formatting of floating point numbers with
Boost since version 1.76.0. Since Boost 1.79.0 this issue has been fixed, so the workaround
is now disabled for versions since 1.79.0.
Release 4.7.1 (April 15, 2022)
Wt 4.7.1 is a patch release that addresses the following issues:
-
Issue #9922:
Wt would send an update to the browser on every call to
WApplication::triggerUpdate()
if server push was enabled.
This is because Wt thought the state was dirty when its JavaScript response buffer contained only
{}
(empty
block). This has been fixed by not sending a response if the buffer contains only {}
.
-
Issue #10177:
WT_API
was missing from Json::TypeException,
which meant that its symbols were not exported from dynamic libraries.
-
Issue #9695:
If a WSuggestionPopup was created before the dialog it appears in,
it would be displayed below the dialog. The
z-index
of
WSuggestionPopup
is now calculated using javascript so it is always shown on top.
Release 4.7.0 (March 11, 2022)
Wt 4.7.0 is a smaller release with no major new features to speak of, just some improvements and bug fixes here and there.
Notable changes in default behavior
These changes affect default behavior in Wt, and may require special attention:
Removals
-
Since Google Maps v2 is no longer available as of May 26 2021, Wt no longer supports v2.
Bug fixes
-
Issue #9562:
- If a Mail::Message was sent more than once, the attachments would be empty after the first time.
- Mails sent by Wt::Auth are now logged using WLogger instead of using
std::cout
.
As a result, the logging can also be disabled by adding -info:Auth.AuthService
to <log-config>
in <wt_config.xml>
.
-
Issue #9035:
The
<head-matter>
configuration option did not work with <script>
elements without content (e.g. when using the src
attribute).
The parser would always turn this into a self-closing tag, which is not allowed in HTML.
-
Issue #9271:
Dbo::backend::MySQL now properly preserves the microsecond part of timestamps.
-
Issue #9264:
Added a remark to WAbstractToggleButton::unChecked() to clarify that it is not emitted
for WRadioButtons.
Release 4.6.3 (March 10, 2022)
Wt 4.6.3 is a patch release that addresses the following issues:
Release 4.6.2 (February 15, 2022)
Wt 4.6.2 is a patch release that addresses the following issues:
-
Issue #9424:
The special "no selection" status of
WComboBox
was lost if the items were rerendered, e.g. if the model changed.
-
Issue #9721:
Somewhere during the Bootstrap 5 transition, we accidentally removed some example code (
pdfImageWrite.cpp
) from the widget gallery.
We added it back.
-
Issue #9572:
Some JSON serialization tests were temporarily disabled since Boost 1.76.0, since the workaround put
in place does not generate entirely the same result.
-
Issue #9571:
Provided a fix for a false positive
-Wfree-nonheap-object
warning in Wt::Signals
.
Release 4.6.1 (December 23, 2021)
Wt 4.6.1 is a single bug fix release, fixing a regression
(issue #9523).
A potential null pointer dereference would crash the Wt site or widget gallery every few days.
Release 4.6.0 (December 14, 2021)
We know that this one took a bit longer than normal. Starting now we intend to make the Wt release cycle
more regular, with a release every three months, so we're planning to release Wt 4.7.0 in March 2022.
We've still been busy improving Wt though. Wt 4.6.0 introduces some major new features, including
Bootstrap 5 theming support, Dbo-based forms, and SAML support for Wt::Auth.
Bootstrap 5 theming support (issue #7418)
We split up WBootstrapTheme into
WBootstrap2Theme and
WBootstrap3Theme, and added
WBootstrap5Theme. We found that the
different Bootstrap versions were distinct enough to warrant splitting each version of the theme up into its own class.
We abandoned development of WBootstrap4Theme
, since there were still some unsolved
issues with it, and we didn't expect many users to be interested in it.
We also updated the design of the widget gallery.
It now uses Bootstrap 5, and no longer uses box layouts, instead opting for a more responsive design featuring
a collapsible menu on narrow screens. This means that the widget gallery is finally usable on mobile phones!
We added a new feature that allows Wt to automatically generate a form for a Dbo class. Based on the data types
that are used by the Dbo class, Wt will generate form delegates.
These form delegates are responsible for creating the widget and optional validator for representing the data type in the UI.
For example:
WString objects are by default represented by a
WLineEdit,
WDate objects by
WDateEdit, and so on.
The user is able to override the default behavior either by customizing the
widgets and/or
validators or by creating a new
form delegate for the specific field and adding
it to the form.
All classes related to this new feature have been added to a new Wt::Form namespace.
Here's a short overview of the most important classes within that namespace:
-
FormModel: a model class that holds the data of the database object.
-
FormView: a view class to represent the database object in the UI.
-
WAbstractFormDelegate: delegate for creating form widgets.
We also added a new example to display this new functionality.
SAML support for Wt::Auth (issue #8621)
We added SAML support for authentication with third party identity providers.
Wt::Auth::Saml::Service
implements a minimal SAML 2.0 service provider for single sign on.
We added a SAML
feature example to demonstrate this.
Note: this implementation is based on Shibboleth's
OpenSAML library. This library uses the Apache License Version 2.0. Due to incompatibility with the GNU General
Public License V2.0 used by Wt, a commercial Wt license is required to distribute derived works using SAML
authentication.
Other features and improvements
-
It is now possible to suspend the WApplication using the
suspend function. Previously,
logging in using an external authentication provider required a popup, but this can now be done through a redirect
(OAuthService::setPopupEnabled()
and
Saml::Service::setPopupEnabled()).
This can also be useful for redirecting to payment providers.
(See issue #7742 and
issue #9439.)
-
Added WServer::docRoot(), which allows
access to the
--docroot
argument of wthttp.
(See issue #9391.)
-
The Bootstrap themes now no longer need an active WApplication
upon construction to properly function, through the addition of an init() function.
(See issue #9204.)
- The WAbstractItemView now allows drag/drop in between rows.
See setEnabledDropLocations().
(See issue #8636.)
- With the latest version of Visual Studio supporting std::chrono's date and time zone support it is now possible
to use it when building Wt in C++20 mode
(
-DCMAKE_CXX_STANDARD=20 -DWT_CPP20_DATE_TZ_IMPLEMENTATION=std
). This means that when Wt is compiled
this way time zone support just works on Windows like it already did on Linux, instead of requiring you to
download the IANA time zone database.
(See issue #8595.)
- Updated the
date
library to commit fb2554a7e00b24d23838b57a4db4121e148edb5c
.
- Ability to change the row header count of WTableView
after it is rendered (see issue #8077).
- Splitting up updates to stay under the form data limit when many updates are rapidly generated
(issue #7990).
- Revert delay of WWidget::load().
Load now happens when a widget is added to the widget tree.
(See issue #7968.)
- Added option to not automatically select first suggestion of a
WSuggestionPopup.
- Wt::Http::Request::hostName()
now takes into account
X-Forwarded-Host
.
- Updated the version of the included
SQLite
to version 3.35.5.
- Added
doc/licenses.md
as an exhaustive list of the licenses used by Wt, source code from external
sources included in Wt and any external dependencies.
Bug fixes
Release 4.5.2 (December 14, 2021)
Wt 4.5.2 is a bugfix release containing the following changes:
-
Issue #9490: Fixed a possible
exception being thrown in the Postgres backend for Dbo when subnormal floating point numbers are retrieved
from the database.
-
Issue #9414: Fixed an error that
occurred when trying to link
libwtdbosqlite3
on Fedora 35.
-
Issue #9363: Added a workaround for
Boost Spirit issue #688,
affecting versions of Boost ≥ 1.66.0.
-
Issue #9270: Fixed a possible but
very rarely occurring race condition
in the generation of ids that would make it possible to have two widgets with the same id in the same
WApplication.
-
Issue #9230: Fixed an issue where the 3-argument version
of QueryModel::setHeaderData
was no longer accessible.
Release 4.5.1 (October 7, 2021)
Wt 4.5.1 is a bugfix release containing the following changes:
Release 4.5.0 (December 15, 2020)
Notable changes
- Wt now targets C++14, and
CMAKE_CXX_STANDARD
defaults to "14". There appears to
be no good reason to maintain C++11 support, since every compiler that supports enough C++11
for Wt also supports enough C++14. You should still be able to use C++11 mode when using Wt
as a library, but Wt itself no longer builds in C++11 mode.
- Wt::Dbo: the Firebird backend
has been marked as unmaintained. The Firebird tests were not succeeding, likely because
of an incompatibility with the unmaintained IBPP that the Firebird backend is based on
and recent versions of Firebird.
Features and improvements
- Issue #7586:
The
<behind-reverse-proxy>
option has been deprecated in favor of a new
<trusted-proxy-config>
option. It's now possible to specify the IP header
that Wt should look for using <remote-ip-header>
(defaults to X-Forwarded-For
).
Wt will trust all proxies listed in <trusted-proxies>
.
When <behind-reverse-proxy>
is set to true
, the behavior stays the
same as it was before. See the library overview for more
information about this option.
-
WFormModel now uses string comparison instead of pointer comparison
for its fields.
-
Issue #7666: In some cases Wt 4.4.0 would
connect
jsScrollVisibilityChanged
even if it was not actually being used, causing extra unnecessary
requests.
-
Added Jenkins pipelines in the
jenkins
folder.
We use Jenkins to test Wt at Emweb but we would usually
keep this configuration in Jenkins. Our pipelines for Linux and FreeBSD have now been updated a bit and moved
into the Wt repository, since they may be of use to people looking to contribute to Wt.
-
Issue #7669: Wt now automatically uses
addChild instead of
addWidget when
addNew is used
on a global widget, like WPopupWidget.
Bug fixes
-
Issue #6367:
fixed issue where wthttp would no longer accept new connections when an error occurred
while accepting a connection, e.g. if the open file limit was reached.
-
WDate::currentServerDate() and
WTime::currentServerTime() now
correctly return the local date and time on the server instead of UTC.
-
Fixed visibility of
OAuthProcess and
OAuthAccessToken.
- Fixed issues
#6548 and
#7749:
URL parameters were being parsed more than once for file uploads, causing a rapid
accumulation of duplicate values during uploads, and potentially causing segmentation
faults. The
wtwithqt
example was also updated so that it properly waits for condition variables in a loop,
to deal with spurious wakeups. Also fixed a potential use-after-free when updating resource
progress.
-
Fixed an issue where the HTTP Client
would wait indefinitely for data when
Content-Length
is zero.
-
WebSockets: If a bad value for
server_max_window_bits
or
client_max_window_bits
was encountered, this would cause
an uncaught exception and a crash. This is now handled properly.
-
Fixed issue with
DISTINCT ON
in X3 based query parser: the fields listed
there would incorrectly be regarded as fields being returned.
-
Fixed issue #7677:
when a font could not be loaded in WPdfImage,
this would throw an uncaught exception. This was changed to logging an error.
-
Fixed issue #7719:
Wt::asString
did not properly handle
unsigned long
.
-
PR #166:
fixed mandelbrot example:
missing call to done().
-
PR #167:
we need to link with Boost unit_test_framework on Windows when
BOOST_DYNAMIC
is ON
.
-
Fixed an issue where WMediaPlayer would not get properly
loaded when
reload-is-new-session
is false
, and the page is refreshed.
Release 4.4.0 (August 3, 2020)
Wt 4.4.0 adds a couple of new features, like multiple X axes, and WColorPicker, among other fixes and tweaks.
Security related
Wt now rejects GET requests for Ajax-enabled sessions that are not for resources, as an
extra means to prevent session hijacking attempts. Patch provided by Bruce Toll in
issue #7585.
Major new features
-
WCartesianChart: similar to how
Wt 4.0.4 added support for multiple Y axes, Wt 4.4.0 adds support for multiple X axes,
too. Instead of trying to squeeze another
int
argument into functions like
WCartesianChart::map,
we decided to add overloads that take two WAxis references.
-
Added WColorPicker: a simple form widget that display a browser-native
color picker. Patch provided in PR #158.
Minor features
-
Wt::Dbo:
-
PR #161: added support for
ON UPDATE RESTRICT
and
ON DELETE RESTRICT foreign key constraints in Wt::Dbo.
-
DBO_INSTANTIATE_TEMPLATES
and the DBO_EXTERN_TEMPLATES
macros used to be disabled with
Visual Studio since they wouldn't work with old versions of Visual Studio. We reenabled those macros, since
they've been working for a while now.
-
Added orWhere.
-
WFileResource: added a log message when failing to open a file. Previously,
it would not be very clear why nothing was downloaded.
-
Added the MIME type for
.txt
files to wthttp
, so that
they are displayed in the browser rather than prompt a download.
-
All of the properties that Wt uses are now listed in the default
wt_config.xml
to make it easier
to get an overview of all of them without having to find them in the reference documentation.
Updates
-
PR #162: Updated included Bootstrap 3 version to 3.4.1 (from 3.3.7)
Bug fixes
-
Wt:: Auth:
-
Issue #7518: previously, it was
not possible to set
AbstractStrengthValidator
to non-mandatory. This has now been fixed. It now also correctly reports
InvalidEmpty when the input is left empty.
-
Fixed an issue where slots connected to Login::changed() would still have the old session id, which would afterwards be updated, causing resource urls created in the slot to have the wrong session id.
-
WPaintedWidget: fixed an issue where combining incremental painting (PaintFlag::Update) with images could cause the first paint event to be discarded, resulting in an incomplete result.
-
Previously, having multiple instances of WGoogleMap could cause JavaScript errors. This has now been resolved.
Release 4.3.1 (April 20, 2020)
This release fixes the following issues:
-
WWebWidget: moved
id_
out of OtherImpl
:
this fixes issues caused by the id_
being removed before other things that depend on it,
like the jsScrollVisibilityChanged_
signal. Fixes
issue #7508.
-
Fixed join information not being copied over when copying
Wt::Dbo::AbstractQuery.
-
MinGW fixes: Direct2D/DirectWrite were disabled and are now enabled
by default. Libraries were changed to lowercase for cross-compiling
from Linux. Windows is case-insensitive, and MinGW libraries on Linux
are lowercase.
Fixes issue #7505.
-
Fixed a wrong documentation link in the widget gallery.
Release 4.3.0 (March 26, 2020)
Wt 4.3.0 mainly adds the ability to redirect logging to a custom logging function, and login and transport encryption to the mail client, among some other fixes and tweaks.
Before, it was possible to send logging to a file or an std::ostream
, and configure which messages were logged in wt_config.xml
. Wt 4.3.0 extends
this with the ability to send all logging to a function, allowing users to redirect Wt's logs to whatever logging framework they prefer to use.
The few log messages coming from Wt::Dbo would always be logged to std::cerr
. It is now possible to change this to use Wt's logger, or a custom log function.
To allow for this new functionality, we introduced an abstract WLogSink class, and the following functions:
Mail client: support for login and encryption (issue #7444)
We added basic support for PLAIN and
LOGIN authentication methods, and
encryption using StartTLS or just
simple TLS.
You can enable authentication with Client::enableAuthentication(), and encryption with
Client::setTransportEncryption(), or using the configuration properties smtp-auth-username
,
smtp-auth-password
, smtp-auth-method
, and smtp-transport-encryption
.
Other changes
Some small changes in behaviour that you may want to be aware of:
-
Wt::Auth: lost password tokens used to be removed as soon as the link was used, even when they were not actually used to change the password. Now, the
token will stay valid until the password is actually changed. Also, if the password is changed through other means, the update password token is invalidated.
-
WCanvasPaintDevice: instead of stopping the drawing entirely when
drawImage()
fails (e.g. because of a missing image),
the image will be skipped but drawing will continue. An error will be logged to the console.
-
Issue #7060: fixed
Request::clientAddress() when behind a reverse proxy to
be the same as WEnvironment::clientAddress(), and as mentioned in the documentation.
-
Issue #7404: reparenting of popup widgets should only stop at scroll bars.
Other changes and fixes:
Release 4.2.2 (March 16, 2020)
This release fixes the following issues:
-
Security-related: in Wt::Auth the lost password email would be sent to the email
address provided in the form, rather than the user's configured email address. While
we treat email addresses as case insensitive, it is possible that the mail server may not,
and that could potentially be used to steal an account. It is however quite rare for
email services to be case sensitive.
-
Issue #7439:
ensure that tooltips are always on top, even inside of a dialog.
-
Issue #7448:
fixed compilation error on recent versions of MinGW, by using the
gmtime_s
function on Windows.
-
Issue #7447:
fixed text format being reset when the text of a WAnchor is cleared.
-
Fix for WLeafletMap issue that was reported on the forum: signals would get unexposed when options were changed.
-
Issue #7457:
moved call to WApplication::require() to the constructor, since calling it in the render function may cause issues.
-
Fixes for WVirtualImage:
- Do not render zero width or zero height images. This was possible when
imageWidth
or imageHeight
was
a multiple of the gridImageSize
.
- Fixed scrollTo() when the image is narrower than the viewport:
scrollTo(0, 0)
would not put (0, 0)
at
the top left when the image was narrower (or taller) than the viewport.
-
Issue #7480: prefix Wt's crypt functions to fix issues
when linking with
libxcrypt
, and also set C code's default visibility to hidden.
-
Issue #7468: fixed panning not working properly for a WCartesianChart with plain tooltips.
-
Issue #7482:
lastId_
in Postgres backend should be long long
.
-
Issue #6774: misc. WTreeView fixes.
-
Fixed use after free caused by order of destruction in WWebWidget destructor.
Release 4.2.1 (February 6, 2020)
This release fixes the following issues:
- wthttp fixes:
-
Issue #7406: requests for absolute-form URLs (e.g.
GET http://localhost:8080/ HTTP/1.1
instead of GET / HTTP/1.1
) are now rejected. No client normally sends requests like this to an origin server. See RFC 7230, section 5.3.2.
-
Issue #7405: multiline HTTP headers (line folding) were causing
wthttp to segfault. This was fixed by removing support for (obsolete) line folding. See RFC 7230, section 3.2.4.
-
Issue #7390: added MIME type for
.wasm
files.
-
Issue #7384: setting the
--docroot
of wthttp
to .;
will now correctly make it so that no path is interpreted as being a static resource.
-
Issue #7350: fixed WPaintedWidget's
wtResize
JavaScript to assume its preferred size when called with a size of -1.
-
Fixed possible JavaScript errors caused by WContainerWidget's
wtEncodeValue
JavaScript not being terminated by a semicolon.
-
Issue #7407: fixed JavaScript memory leak related to deferred or HTML tooltips.
-
Issue #7360: documented Wt::Mail::Message::Recipient.
-
Issue #7393: if the internal path is set to invalid in initialize, Wt should still send a 404 status code.
-
Issue #7361: a previous attempt at fixing horizontal scrolling stutter
in Wt 4.1.1 caused a regression in WTableView::scrollTo().
-
Fixed several issues with WLeafletMap that were
reported on the forum.
-
WCartesianChart: when there were so many bars on
a bar chart that the width of a bar became 0, placing tooltips would cause a crash. Wt will now skip
tooltip placement when bars get too narrow.
-
WSuggestionPopup: when
setDropDownIconUnfiltered(true)
was used, pressing the up/down arrows to move through the list would cause it to be filtered.
-
Reverted a previous change to WModelIndex: since the comparison operator of model indexes
uses the parent, we can't insert raw indexes into a
std::set
.
-
Issue #7353: added mention in 3.5.0 release notes about
WPdfImage pen width fix.
-
registerType now uses
std::type_index
instead of comparing type_info
pointers.
-
Some widgets (like WTreeView) would not be properly sized when they were initially hidden.
-
Fixed a segfault in WTableRow, reported on the forum.
-
Miscellaneous documentation fixes.
-
CMake fixes:
-
wt-config.cmake
: CMake would look for Boost even when Wt was linked dynamically, and
Boost was linked statically, like in our Windows builds.
-
wt-config-version.cmake
: match
function needed to be math
-
CMake needed to look for
Boost::filesystem
for some examples (but didn't).
If you diff this release with the last one, it looks like we've changed a lot more, but this
is simply because we needed to update Emweb bvba to Emweb bv everywhere.
Release 4.2.0 (December 3, 2019)
Wt 4.2.0 introduces no major new features, but comes with some nice fixes and little quality of life improvements.
Notable backwards-incompatible changes
- WSuggestionPopup: wordSeparators no longer requires (extra) escaping, so a newline is indicated with the string literal "\n", not "\\n". Similarly, the whitespace property was incorrectly documented as requiring (extra) escaping.
- The WLogEntry copy constructor–which logically performed a move–was removed and replaced by a move constructor.
- Removed
WDatePicker::setGlobalPopup
–it was deprecated in Wt 3.3.0, but we forgot to remove it in Wt 4.
- WLogger now logs opening of log file to the previous output (usually
std::cerr
) using the logger instead of directly to std::cerr
. This allows to disable this log message with -info:WLogger
.
CMake changes
-
When using GCC and clang, the default visibility of symbols is now set to hidden. This limits the exported symbols to only Wt's public interfaces,
reducing the size of
.so
files and preventing accidental use of unexposed APIs.
-
Added Wt version information to Wt's CMake config files
HTTP connector
It's now possible to get client certificate information in wthttp when behind a reverse proxy, see the documentation for WEnvironment::sslInfo() for more information.
This is tested to work with nginx and Apache. HAProxy is currently not supported, since its variables are in a rather different format.
Wt can still use this info even if Wt itself is compiled without OpenSSL.
Features
Fixes
-
Limited prevention of default action of the
dragstart
event to only draggable widgets. This used to be global (set on document.body
), but could conflict with other JavaScript libraries, especially when Wt is used in WidgetSet mode.
-
Issue #7210: fixed removal of all widgets in a layout causing a JavaScript error
-
Fix for PR #145: fixed linking error on Windows (unresolved external symbol "public: static struct Wt::NoClass Wt::NoClass::none")
-
WPainter: fixed arc drawing code to be consistent across different backends, and with Qt's QPainter. Its behavior used to be erratic when angles larger than 360 degrees or lower than 0 were used.
-
WPdfImage: fixed double scaling of pen width (e.g. a pen of width 4 pixels, and a scaling factor of 2 would result in a 16 pixel wide pen instead of an 8 pixel wide pen).
-
Many documentation tweaks and fixes that were discovered when working on JWt 4.
-
Fixed issue #7139: some widgets would fail to be correctly reparented.
-
Fixed issue #7336: Wt was touching the history API every 10 ms when scrolling to store the scroll position, causing sluggishness, especially on mobile browsers with smooth scrolling. The scroll position is now saved after the user has stopped scrolling.
-
Fixed issue #7323: updated the broadcast feature example: its use of
bindSafe()
was incorrect
Release 4.1.2 (October 30, 2019)
This release fixes the following issues:
- wthttp security issues:
- Wt internally used an
SSL-Client-Certificates
header to send client certificates to child processes when using dedicated process mode. It was however always accepted even when Wt was not behind a reverse proxy, and sent to child processes as-is. wthttp
now correctly disregards it when not received from a reverse proxy. The header was also renamed to X-Wt-Ssl-Client-Certificates
to clarify that it is a non-standard internal Wt header.
- When using dedicated session processes with wthttp, the parent process would trust
X-Forwarded-Proto
and X-Forwarded-Port
even when Wt was not configured to be behind a reverse proxy. These are now discarded.
-
Fixed an issue raised on the forum causing
WTreeView
to not properly react to certain size changes.
-
Fixed issue #7291: wtfcgi would not properly match default entry point
-
Fixed a few issues found by clang-analyzer:
-
Fixed an issue in WAnchor that would cause
image()
to return nullptr
if it was provided in the constructor.
-
Fixed WCssDecorationStyle self-assignment
-
Made tests succeed even if Wt is built with
ENABLE_UNWIND=ON
.
- issue #7292: OAuthService now correctly uses
refresh_token
instead of refreshToken
- Http::Client fixes:
- fixed issue #7272: support
@
character in the path of a URL
- fixed 204 No Content response code behavior (would hang before, waiting for content) (issue #7273)
- More informative error and exception messages:
QueryModel
's "geometry inconsistent with database" exception now contains row and cache start and size information
WebSession
's "not serving this" info message contains more context so it's less confusing
- Documentation fixes:
- The release notes for Wt 3.3.8 incorrectly referred to
allowed-hosts
, while this property is actually named allowed-origins
- Updated WLocale::setTimeZone() documentation
Release 4.1.1 (September 9, 2019)
This release fixes the following issues:
- Fixed horizontal scrolling stutter on mobile browsers in
WTableView
- Fixed issue #7000: possible out of bounds access in
WTableView::itemWidget()
- Fixed
valueChanged()
documentation of WSpinBox
and WDoubleSpinBox
- Fixed issue #7164: Added missing
<stdexcept>
include to observing_ptr_impl.hpp
- Fixed issue #7167: configure SSL context when using
--https-listen
too (not just when using --https-address
/--https-port
- Fixed issue #7187: contents of
WTabWidget
did not properly stretch in height
- Fixed issue #7193: compatibility with Pango 1.44: added harfbuzz include dir
- Fixed issue #7195: contents of
WStackedWidget
would not properly respond to window size change
- Fixed issue #7206: added mention in Wt 4.0.0 release notes that
setObjectName()
does not change a widget's id
anymore. It is now in an extra attribute called data-object-name
.
Release 4.1.0 (July 31, 2019)
This is the first release to change the versioning scheme to be more aligned with semantic versioning.
From now on, the last number is reserved for patches (i.e. important bug fixes), not extra features, as long as
those bug fixes don't require major changes. Patches will be released up until the next minor version bump.
From now on, a 4.1-release branch will track any bug fixes, while the master branch will become the next release (in this case 4.2.0)
We won't completely ban small API-breaking changes from the minor version, but we will as always avoid them as best as we can.
This also does not mean that Wt will now have a stable ABI. You will always have to recompile in order to do
a minor version upgrade of Wt. Wt has never had a stable ABI, and that isn't going to change.
Apart from that, this release features one new widget (WLeafletMap) and many little tweaks, features, and bug fixes.
Notable backwards-incompatible changes
- Extensionless headers (e.g.
#include <Wt/WApplication>
instead of #include <Wt/WApplication.h>
) have
been deprecated since Wt 4.0.0. These headers were now removed. Use the script migrate/wt4_add_h_to_includes.py
if you
want to automate the rewriting of extensionless headers.
- When using the GraphicsMagick implementation of WRasterImage, the rendering to
raster image is now done in done() instead of handleRequest().
You were always supposed to destroy your instance of WPainter, or call WPainter::end()
before e.g. using write(), but Wt used to be rather forgiving—it would just work.
If you are getting empty images after updating, this would likely be the reason.
-
WApplication::UpdateLock::operator bool() and
observing_ptr::operator bool() were made
explicit
,
so they will no longer implicitly convert to bool
, only
contextually.
This may cause some valid code to no longer compile, but it is more likely that it will actually uncover bugs.
-
The default z-index of WPopupWidget was changed to 1100 instead of 100, since 1000
is the highest z-index used by Leaflet. This is generally considered an implementation detail, but if you have written any custom
CSS that sets the z-index, then you may have to update this CSS.
New widgets
-
WLeafletMap: this is a wrapper around the Leaflet
JavaScript library. It has support for some basic features of Leaflet, and one special feature: the ability to add arbitrary
widgets (within reason) as markers to the map using WidgetMarker.
New examples
CMake changes
-
Wt now uses CMake's included FindOpenSSL, FindZLIB and FindPNG modules instead of its own.
-
WT_CPP17_ANY_IMPLEMENTATION
is now set to any
by default when CMAKE_CXX_STANDARD
is set to
17 or higher, i.e. it defaults to std::any
.
-
Removed the "vintage" method of finding Boost, because it has been obsolete for a long time already.
-
Fixed building with Boost 1.70 when using Boost's included package configuration files for CMake.
-
Made the
wtwithqt
example build with Qt 5 too, not just with Qt 4.
-
Made sure we can properly build
wtdbomysql
with a static MariaDB client library on Windows.
Auth
-
Added AuthService::setAuthTokenUpdateEnabled(). Previously, when using the
remember me functionality the auth token (remember me cookie) would be changed. When accessing the application from two tabs at the same time, however, or when
refreshing quickly, this could cause the session to be logged out: the auth token has changed, but the client still uses the old one. This is still the default
behavior, but you can disable it by using
setAuthTokenUpdateEnabled(false)
.
-
Fixed a use-after-free issue when Auth::Login::changed() is connected to a slot that
removes the AuthWidget.
Dbo
-
Added AbstractQuery, an abstract base class of Query,
to facilitate the dynamic generation of queries.
-
Added Query::join(),
Query::leftJoin(),
and Query::rightJoin().
-
Added support for
std::optional
when using C++ ≥ 17.
-
std::chrono::time_point
and std::chrono::duration
were treated as nullable, while they should be non-nullable, since they have
no reasonable "null" value. Use std::optional
or boost::optional
to make them nullable instead.
-
Fixed a query corruption bug when using
UNION
, INTERSECT
, or EXCEPT
(issue #7028).
-
Fixed a crash when using
Session::dropTables()
while there is an active transaction, as reported on the forum.
-
PostgreSQL uses
?
for some operators, but that is also the character we use for placeholders in prepared statements. If the literal ?
is meant instead of a placeholder, you can now use ??
. This is similar to how PostgreSQL's JDBC driver handles it.
Miscellaneous features
Miscellaneous bug fixes
- Fixed an issue where JavaScript could be sent to the browser in the wrong order when doing background updates of hidden widgets
(issue #7023)
- Fixed a client side memory leak caused by misuse of jQuery's data feature (reported on the forums)
- WTableView: fixed row deletion behavior
- Fixed icons not showing up on tabs and menu items when using WBootstrapTheme, as reported on the forums.
- Fixed wrong WStackedWidget height when animating transitions (issue #6788)
- Fixed not able to hide widgets with a flexbox-based layout (issue #6884)
- Fixed out of bounds array access when using a widget with a custom HTML tag name (issue #7059). Widgets will now derive whether they are default inline based on the widget's default DOM element type.
- Fixed a regression in WDate::addMonths() and addYears(), introduced in Wt 4.0.0. When a day would not exist in the resulting month, this would yield an invalid month. Instead, it will now (as it did in Wt 3) set the date to the last day of that month, e.g. May 31, 2019 + 6 months becomes November 30, 2019.
- Fixed an issue where mouse signals of a WTreeView would fire multiple times (issue #6260)
-
wthttp WebSocket fixes:
-
WebSocket requests for non-existent sessions (often the result of restarting the server) no longer create a new bogus session.
-
WebSocket messages with continuation frames (as sent by Google Chrome when the messages become very large) could become corrupted,
especially when per-message-deflate is used (issue #7039,
#7034).
-
WebSocket message size is now properly limited by
--max-memory-request-size
. Previously, this would only limit the size
of individual frames, not the entire message.
-
Fixed a possible use-after-free or double delete issue when an invalid WebSocket message was received.
-
Fixed undefined
ackId
overflow behavior (which could very rarely cause a session to fail)
-
WContainerWidget::setLayout() now properly clears any existing contents of the container.
This would previously cause JavaScript errors (issue #7128).
Release 4.0.5 (December 14, 2018)
Wt 4.0.5 is almost entirely a bugfix release. Here are the key changes:
Minor API breaking changes
ItemDataRole
One of the things we changed in Wt 4 is the type of roles in the
MVC system. They are no longer
represented by an enum, but now through a
class that's a thin wrapper
around an int. We however forgot to update the role's type in
a few places, and this release rectifies that. The following methods
have been updated:
Wt::Auth::UpdatePasswordWidget
The UpdatePasswordWidget,
part of the authentication subsystem of Wt, would delete itself when done.
This was harmless when it was inside of a WDialog, but it's less practical when
used elsewhere. We've changed the behavior of UpdatePasswordWidget
to emit the
updated() and
canceled()
signals instead.
Dbo: reentrant statement use
For the longest time, the Dbo tutorial has mentioned that
“you need to be careful to not have two collections with the same statement busy at the same time”.
If you did attempt concurrent use of statements, an exception mentioned that
“Reentrant statement use is not yet implemented”. Starting from
Wt 4.0.5, you won't see that error anymore. Dbo will now
clone the prepared statement as needed.
Flex layout fixes
One of Wt 4's niceties is the fact that the layout managers now rely less on JavaScript, but employ flexbox instead. This
did not work perfectly, though, so it was still possible to switch the implementation to the old JavaScript method if things
did not work correctly. We fixed many issues in the flex layout implementation, and now the widget gallery works
correctly using flexbox (pending an overhaul to make the widget gallery more responsive and more in line with the Wt homepage theme).
Release 4.0.4 (August 22, 2018)
This release brings with it the usual bugfixes, but also some new features:
WCartesianChart improvements
Multiple Y axis support
In previous versions of Wt, it was already possible to have two separate Y axes. This release
allows for any amount of Y axes, and extends the interactive functionality to support multiple Y axes.
The following methods have been added:
WCartesianChart
-
Small breaking change: note that the virtual method
prepareAxes
has been modified to take a WPaintDevice*
argument. If your code overrides this method, be sure to add this argument to your overridden version.
WDataSeries
-
It's also possible to pan and zoom individual axes by scrolling on or dragging the axis itself, or by touch dragging and pinching.
On-demand loading
We've added on-demand loading functionality to WCartesianChart
. Enable on-demand loading when you have a lot of data and/or need the ability to zoom in very far. This will make it so that only the data for the visible X range is loaded, and will improve performance of data series with large amounts data. This becomes especially useful in combination with the ability to set a maximum zoom range, so that you can't zoom all the way out to see all data.
The following methods have been added:
WCartesianChart
-
WAxis
-
Note that the data must be ordered on X axis value for this feature to work properly.
Path parameters
It's now possible to use variables in WServer::addResource()
, e.g. server.addResource(&resource, "/users/${user}")
.
These parameters are then accessible in the WResource
's handleRequest()
function through
Http::Request::urlParams()
and Http::Request::urlParam(const std::string&)
.
A feature example demonstrating this was added in examples/feature/urlparams
.
Idle timeout
Added an <idle-timeout>
option to the configuration (wt_config.xml
). If set,
WApplication::idleTimeout()
will be triggered after the configured number of seconds.
This is intended to prevent unauthorized people from using an active session from a
device that's been abandoned by the user.
WFileDropWidget
Added the ability to set a
JavaScript filter, e.g. to
compress uploads client side.
Miscellaneous improvements
- Added support for transparency in PDFs
- Rudimentary support for drawing SVGs on HTML canvas with
WPainter::drawImage
-
Wt::Dbo::backend::MySQL
:
Fixed compatibility with MySQL Connector/C 8.0 and MariaDB Connector/C 3.0
-
Added
WEnvironment::timeZoneName()
-
Added
insertTab
, itemAt
and currentItem
to
WTabWidget
-
Disabled TLS v. 1.0 and 1.1 support
Release 4.0.3 (April 12, 2018)
This release fixes compatibility with Boost 1.66, fixes some bugs, and adds
some functionality:
- WFileUpload: added display widget
- Often, native file upload field look out of place in the rest of a web application's design.
A common trick is to hide the file upload field, and add another widget that forwards its click
signal to the file upload field. We added
setDisplayWidget()
to make it easy to implement that trick.
- WFileDropWidget: added drop indication and global drop
- When drop indication
is enabled, a WFileDropWidget will be highlighted as soon
as a file being dragged enters the page. When
global drop is enabled, then a drop
anywhere on the page will put the file in the WFileDropWidget.
- SqlConnection::executeSqlStateful()
- SqlConnection::executeSqlStateful() allows to execute SQL that should be re-executed upon automatic reconnect. Automatic reconnect
is currently supported for the Postgres
and MySQL backends.
- WTableView: exposed touch events
-
We made it possible to define custom behaviour upon touch events on WTableView, by
adding the touchStarted(),
touchMoved(), and
touchEnded() signals.
Release 4.0.2 (November 24, 2017)
This is a patch release that fixes a few problems with the build of Wt 4.0.1, and fixes a bug in Wt::Auth.
Release 4.0.1 (November 21, 2017)
This is a smaller release with mostly bugfixes, and some new features:
- Added WContainerWidget::addNew() and similar methods
-
Because writing code like this:
auto text = root()->addWidget(std::make_unique<Wt::WText>("Hello!"));
is a bit verbose, a shorthand was added that creates the widget and adds it to the container in one go:
auto text = root()->addNew<Wt::WText>("Hello!");
addNew
forwards its arguments to the constructor, just like std::make_unique
.
Along those lines, we added WContainerWidget::insertNew() and WTemplate::bindNew().
- Added the
<max-formdata-size>
configuration option
- Previously, the maximum size of form data sent by Wt in a single POST request was capped to 5 MiB.
In applications with a large amount of forms with a lot of data, that may not be enough,
so
<max-formdata-size>
can be used to adjust this independently. Note that
the maximum request size (and by consequence, the form data size) is still capped by
<max-request-size>
.
Release 4.0.0 (September 19, 2017)
This release has all of the added features of Wt 3.3.8, but comes with many notable changes. In general,
Wt 4 employs the more modern C++ style of C++11 and beyond. Support for compilers
without sufficient C++11 support is dropped completely. Wt 4 aligns more with the
C++ Core Guidelines
in a pragmatic way, while keeping the API familiar.
New features since Wt 3.3.8
- Microsoft SQL Server backend for Wt::Dbo
- We've added Microsoft SQL Server support to Wt::Dbo, making it the sixth
backend we support, alongside Sqlite, PostgreSQL, MySQL (and MariaDB),
Firebird, and Oracle (not part of the open source Wt because of licensing).
With this addition, Wt::Dbo now supports most commonly used relational database management systems.
It's based on ODBC and works with Microsoft's ODBC Driver
for SQL Server. With unixODBC, Linux and macOS are also supported.
- Added support for listening on multiple interfaces and ports to wthttp
-
With the multivalued --http-listen
and --https-listen
options,
you can now listen on multiple interfaces and ports. For example, if you want to
listen on port 8080 on all IPv4 and IPv6 interfaces, you can use:
--http-listen 0.0.0.0:8080 --https-listen [0::0]:8080
--http-listen
and --https-listen
obsolete the
--http-address
, --http-port
, --https-address
, and --https-port
options.
Changes in Wt's memory model
Like before, the parent widget (e.g. a WContainerWidget) owns
its child widgets. This has not changed. Wt 4 makes ownership transfers more clear by using std::unique_ptr
There are no more owning raw pointers in Wt's public API.
By consequence of using unique_ptr
, constructors no longer take a parent
argument. For
convenience, addWidget()
now returns a (non-owning) raw pointer. Instead of doing:
Wt::WPushButton *button = new Wt::WPushButton("Click me", parent);
or:
Wt::WPushButton *button = new Wt::WPushButton("Click me");
parent->addWidget(button);
You can now do:
Wt::WPushButton *button = parent->addWidget(std::make_unique<Wt::WPushButton>("Click me"));
Wt::cpp14::make_unique
can be used instead of std::make_unique
if C++14 support is unavailable.
Some classes were changed from the old single ownership
model to shared ownership through std::shared_ptr
, like models (WAbstractItemModel, WAbstractChartModel, and derivates) and validators.
Wt::Core::observing_ptr was introduced. This pointer will
be notified when the object it points to is deleted. observing_ptr
s are intended to be used within the
scope of a WApplication and are not thread safe. Every
WObject (and by consequence, every widget)
is an observable, so its lifetime can be observed with
an observing_ptr
. Their use is entirely optional, but they may be useful when the lifetime of an
object is not always clear.
Header files now end in .h
Wt 3 used extensionless headers. This confuses many editors and IDEs.
For Wt 4, the
.h
extension was added, and using the old style headers is deprecated. You can use the
Python script
migrate/wt4_add_h_to_includes.py to help update your Wt includes.
Enums replaced by enum classes
Many enums were replaced with enum classes, and many have been moved from class scope to namespace scope, e.g.:
enum SelectionMode {
NoSelection = 0,
SingleSelection = 1,
ExtendedSelection = 3
};
became:
enum class SelectionMode {
None = 0,
Single = 1,
Extended = 3
};
Some enums were preserved in places were the added verbosity
was undesirable, like the
Wt::Dbo::RelationType enum.
Replacements for Boost
Many features of Boost that Wt relied on were made obsolete by C++11. Many other Boost features have been replaced
with C++11-based alternatives.
- Choice between Boost.Asio and standalone Asio
-
The CMake option
WT_ASIO_IMPLEMENTATION
allows to choose between boost
and standalone
Asio.
- Removal of Boost usage in Wt headers
-
If standalone Asio is used, the installed headers of Wt no longer include any Boost headers.
The Windows builds of Wt 4 will from now on no longer include Boost,
including only the standalone Asio headers instead. This just about halves the size of the installer.
If you want to use Boost, you'll have to provide your own. You can find prebuilt Boost binaries for Windows
here.
- Boost.Date_Time was replaced with Howard Hinnant's
std::chrono
-based date implementation
-
The author of the
std::chrono
standard has created a
library for dates and time zones.
This library is proposed for inclusion into the C++ standard in the future. For now, Wt includes
this date and time zone library (at this moment, this is version 2.2). This is used for all time-related
classes, like WDate,
WTime, WDateTime,
and WLocalDateTime.
-
Boost.Any replaced by
Wt::cpp17::any
-
WStandardItemModel relied heavily on
boost::any
. This was replaced with Wt::cpp17::any
. You can choose the
implementation of any
to use with the CMake option WT_CPP17_ANY_IMPLEMENTATION
.
Valid options are:
- thelink2012: this is the default implementation, included in Wt
experimental
for std::experimental::any
std
for C++17's std::any
- Boost.Signals2 replaced with own implementation
-
Wt did not use many of the features of Boost.Signals2. Since C++11, many more efficient alternatives
have been created. Wt 4's implementation, based on
this blog post, offers better performance
and more understandable stack traces. It's now no longer necessary to
use std::bind
with lambda functions, e.g.:
button->clicked().connect(std::bind([]{ std::cout << "Clicked!" << std::endl; }));
can be changed to:
button->clicked().connect([]{ std::cout << "Clicked!" << std::endl; });
Boost.Signals2, together with boost::bind
, allowed you to automatically disconnect slots
when one of their bound arguments was deleted, if the argument was a derived class of
boost::signals2::trackable
. In Wt 4, this is no longer the case. Instead, you
can provide a target WObject as the first argument to
the connect function, and Wt will disconnect the slot when the target WObject
is deleted.
WApplication::bind
has been removed, and instead
observable::bindSafe
was introduced. bindSafe
will guard the observable
, returning a function
object that doesn't do anything if the observable
has been deleted.
- Other Boost libraries obsoleted by C++11
- Boost.Thread, Boost.Regex and Boost.Random were mostly replaced by their STL counterparts. Only
Boost.Thread is used internally in Wt 4 because Wt uses some mutex functionality that's not part of
C++11.
Other changes:
-
ItemDataRole is now a class instead of an enum.
-
Wt 4 assumes that
std::string
is UTF-8 encoded by default, so
WString(std::string)
will assume that the argument is UTF-8 encoded. Overloads for new C++11 string types
(std::u16string
, std::u32string
) have been added.
-
Intervals and other durations previously indicated by
int
s have been replaced by
std::chrono::duration
s, e.g. in
WIOService::schedule() or
Wt::Http::Client::setTimeout().
-
WBoxLayout is now implemented with flexbox instead of JavaScript
by default. Wt will fallback to the old JavaScript implementation when functionality unavailable in
the flexbox implementation is used, use
WBoxLayout::setPreferredImplementation
to set a preferred implementation.
-
setObjectName() no longer affects the
id
of a widget. Instead, it is
placed into an extra attribute called data-object-name
. selenium/wtLocators.js
has been updated to reflect this change.
Removal of deprecated functionality
-
Everything that was marked as deprecated in Wt 3.3.7 has been removed,
including
Wt::Ext
.
-
WScrollArea
was removed, use CSS or
WContainerWidget::setOverflow() instead.
Release 3.3.8 (August 16, 2017)
This release consists of bug fixes and some new features:
-
OpenID Connect support
-
As we've previously announced
on our blog,
Wt now supports OpenID Connect. All you need to do to use any OpenID Connect based service is
configure a Wt::Auth::OidcService. You can also make your
own OpenID Connect identity provider. Check out the accompanying
OpenID Connect feature example.
-
On Windows: font support based on DirectWrite
-
Wt 3.3.7 already introduced the Direct2D backend for WRasterImage.
Wt 3.3.8 further expands
on this by adding DirectWrite-based font support. This means that Wt 3.3.8 will be able to
select the appropriate fonts for every glyph, without requiring Pango. Pango was always
difficult to distribute on Windows, so we never included Pango in the binary distribution, relying on
very basic font support instead, replacing unknown characters by question marks. Now, you
can expect much better Unicode support with DirectWrite on Windows.
This means that the binary release of Wt on Windows is now built with Direct2D and DirectWrite.
-
Wt::Dbo: added sql_value_traits for
Wt::Json::Object and
Wt::Json::Array.
-
Quite often, the need arises to store some unindexed data with arbitrary structure in a database.
A common solution is to store JSON as a string. To facilitate this, we've included implementations
of sql_value_traits for
Wt::Json::Object and
Wt::Json::Array in
Wt/Dbo/WtSqlTraits
. This allows you to store Wt::Json
Objects and Arrays
just like you any other field.
Additionally, we've made the Wt::Json
API a bit more friendly, by adding support
for initializer lists (when using C++11), and implicit constructors for
Wt::Json::Value
from
Wt::Json::Object and
Wt::Json::Array.
-
Added
<allowed-origins>
configuration option for CORS
-
Wt used to allow almost any origin, to allow Wt applications to be embedded in any page using
WidgetSet mode. Although Wt encodes session IDs in URLs rather than cookies by default, this
could still pose a security risk in some cases. In Wt 3.3.8, CORS support has been updated:
Wt now only allows cross-origin resource sharing for WidgetSet entry points, and trusts no
origin by default. You can specify the allowed origins using the
<allowed-origins>
tag in the configuration file. Using <allowed-origins>*</allowed-origins>
restores the old behaviour.
-
Other small improvements:
-
- Any
boost::asio::io_service
can now be used with Wt::Http::Client,
instead of just Wt::WIOService.
- Added support for
PATCH
requests in WResource and
Wt::Http::Client,
next to GET
, POST
, PUT
, and DELETE
.
- wthttp connector: added support for forward secrecy with the
--ssl-prefer-server-ciphers
option.
- Added the
num-session-threads
configuration parameter, to set the amount of threads per session when
using dedicated process mode. By default, the main process and the session threads use the same amount of threads.
- The te-benchmark
example was added, implementing the TechEmpower framework benchmarks.
This example also demonstrates how Wt can be used to write RESTful services. Improved, less verbose, support for
RESTful services is planned in a future release.
- Added Wt::Dbo::FixedSqlConnectionPool::setTimeout(), to set a timeout for obtaining a connection.
- Added Wt::Dbo::backend::Postgres::setTimeout(), to set a timeout for queries.
- Added libunwind support for printing stacktraces. Enable this with the
ENABLE_UNWIND
CMake option.
Release 3.3.7 (March 31, 2017)
This release fixes many bugs, but also introduces some new features:
-
WFileDropWidget
-
The WFileDropWidget is a new widget that allows you to upload a file or multiple files by dragging them onto an area.
-
Scroll visibility
-
Some applications require you to know whether a widget is currently visible within the viewport, or whether it is
scrolled out of view, e.g. to load more content as you scroll down the page. You can now enable scroll visibility
detection with
WWidget::setScrollVisibilityEnabled(bool),
and react to changes in visibility with
WWidget::scrollVisibilityChanged().
A new scrollvisibility feature example has been added to demonstrate this infinite scrolling application.
-
Touch events
-
Although Wt already supported touch interactions in the charting library, touch events were previously
not exposed by Wt. Now,
we've added WTouchEvent, and the touchStarted, touchEnded, and touchMoved
events have been added to
WInteractWidget.
Also, draggable widgets can now also
be dragged after a long press, and you can select a range using a double touch in
WTableView and WTreeView.
-
Combined session tracking mode
-
The default session tracking method for Wt is URL rewriting, using JavaScript to hide the session id from
the address bar. Alternatively, cookies can be used with the Auto option, falling back to URL rewriting when
cookies are not available. However, the cookie-based method did not allow for multiple sessions within the
same browser.
In order to make the URL rewriting method with requirement 6.5.10 of the PCI Data Security Standard, while not
sacrificing the ability to have multiple sessions, a new Combined session tracking strategy has been added.
Wt already makes it difficult to steal a session when the session id is discovered, but resources are not as
protected. The Combined session tracking strategy uses URL rewriting in combination with a cookie that is shared
between sessions as an extra measure against session hijacking. This is the most secure strategy, but it will
deny access if cookie support is not available.
-
Wraparound for WSpinBox and WTimeEdit
-
WSpinBox will now wrap around from its maximum to its minimum if you enable wraparound. WTimeEdit will take advantage of this feature by default.
-
On Windows: Direct2D implementation of WRasterImage
-
We've added another implementation for WRasterImage on Windows: Direct2D. When building Wt, this
implementation will be enabled by default. This allows to remove the dependency on GraphicsMagick or
Skia on Windows, simplifying the build process.
-
Some minor extra features:
-
-
It's now possible to retrieve a vector of all request headers with Wt::Http::Request::headers() in handleRequest when implementing a WResource. It is still recommended, and more efficient, to use headerValue, but retrieving a vector of all headers could be useful for debugging purposes.
-
In an effort to reduce the amount of JavaScript generated by the charting API, the
WPainter::drawStencilAlongPath()
method was added to WPainter.
-
Previously, WDialogs were movable by default. It's now possible to disable this with
WDialog::setMovable().
Release 3.3.6 (July 13, 2016)
This release has a focus on bug fixes and some new features:
-
Support for WebSocket compression in wthttp
-
WebSocket traffic is now compressed, if possible.
-
Time entry improvements
-
WTimeEdit now supports AM/PM in its format,
WTimeValidator now allows to select a minimum
and maximum time and supports multiple formats,
WTimePicker can now work up to
millisecond precision, and is now rendered with spinboxes.
-
Skia version updated
-
The Skia backend for WRasterImage is now compatible with more recent versions of Skia. If you need
to support an older version of Skia, use
-DWT_SKIA_OLD=ON
. The Skia version of the Windows builds
has been updated from 394c7bb to 834d9e1.
-
Wt::Dbo
-
-
It's now possible to mark foreign keys as literal with a “>” prefix, so Wt::Dbo can better map to
an existing schema. Note that for consistency, this also means that the schema generated for ManyToMany relationships
has been changed to include the id column names if a joinId has been specified. If you specify a joinId for ManyToMany
relationships, you'll have to change it to include a “>” before it in order to keep the same database schema.
-
The
size
argument of belongsTo() has been
removed, since it served no actual purpose.
-
Scroll position
-
It's now possible to retrieve the scroll position of a
WContainerWidget
with
scrollTop()
and
scrollLeft().
-
Invalidation of stateless slots
-
WObject::isNotStateless()
has been added, so functions called from functions that are marked as stateless can unmark
it as stateless, reverting to plain server-side dynamic UI updates.
-
Auth::Dbo::UserDatabase
-
The Dbo UserDatabase implementation now
compares e-mail addresses case insensitively. The AuthService
can be passed in the constructor, so the UserDatabase
knows whether the IdentityPolicy is EmailAddressIdentity.
-
Charting library
-
There have been many bug fixes and improvements to the charting library and the interactive features
introduced in Wt 3.3.5:
- Series can be selected
on a WCartesianChart.
LineSeries can be manipulated.
- WAxis::setZoom() and
WAxis::setPan()
have been deprecated in favor of the easier to use
WAxis::setZoomRange().
You can listen to changes in zoom range with the
WAxis::zoomRangeChanged() signal.
- Series set as hidden will still be shown on a WAxisSliderWidget.
The typical application for this is to show a coarse model on the slider widget, and a more detailed one on the chart.
-
In order to provide better performance for charts containing a lot of data, the charting library has been
overhauled to use WAbstractChartModels,
instead of WAbstractItemModels, avoiding the use of
boost::any. The WStandardChartProxyModel
wraps a WAbstractItemModel so that those can still be used with charts.
Note that this changes the return type of the
WAbstractChart::model() method.
- A chart's axes can now be inverted.
- Stacked series: negative values are now stacked separately from positive values.
- Curve labels can now be drawn on charts, so that curves,
or certain points on curves, can be labeled.
- WAxis::getLabelTicks()
has been modified with an argument
AxisConfig, so that different axis ticks can be drawn depending
on the side that the axis is dawn on, or the zoom level it is drawn at. This is a breaking change if you override getLabelTicks.
WAxis::setLabelTransform()
as a simpler method to change the tick
labels depending on the side the axis is drawn on.
- WDataSeries is no longer a simple value class. The interface of
WCartesianChart has been modified to reflect that: the old
interface that copies WDataSeries over has been deprecated in favor of an interface that takes pointers to
WDataSeries.
- It's now possible to specify a different model
for each WDataSeries.
- Chart::WPieChart::createLabelWidget()
has been added, making it possible to replace the labels of a
WPieChart
with widgets.
- Tooltips on charts can now be deferred, which can improve performance of interactive charts, and if you have a lot of tooltips.
Release 3.3.5 (Dec 31, 2015)
This release has a focus on bug fixes but also one or two new features:
-
Chart::WCartesianChart
-
WCartesianChart has several new features that allow interaction with the
chart without server roundtrips. These features include zoom, pan,
crosshair and follow curve functionality.
This is only available if the chart is drawn
on an HTML canvas. This is the default rendering method on modern browsers.
When enabled, the crosshair will follow mouse movement,
and show in the top right corner the coordinate
(according to X axis and the first Y axis) corresponding to this position.
-
Chart::WAxisSliderWidget
-
WAxisSliderWidget lets you easily focus on a particular range by selecting an XAxis. It will create a sliding widget where you can change the size of the focused region by dragging the blue handles, and change the position by dragging the selected area. When using touch, the size of this area can also be changed using a pinch movement.
-
WPainter, WJavascriptHandle, WCanvasPaintDevice
-
The above functionality was implemented by making client-side interaction possible for a scene rendered
on WCanvasPaintDevice. For this purpose, for several primitives used to draw on a canvas, we provide
a JavaScript handle and complementary API to manipulate these objects in JavaScript code. In this way you
can keep the bulk of the painting code in C++, and allow manipulation from within JavaScript.
Such JavaScript handlers have been made available for WTransform, WPen, WBrush, WPointF, WRectF and WPainterPath.
- WAnchor target (such as this window, or new window) moved to WLink
- As WLink is used in several places (including for example inside item data models), the target can now be specified in more places in the same consistent way. However, since until now a WAnchor was the owner of the TargetType, this may break existing code which calls WAnchor::setTarget() before WAnchor::setLink(), as the latter overrides the target.
- A new TargetDownload target was added for links.
- Until now it was recommended to use TargetNewWindow as otherwise this would interfere with the rendering of the current page (since browsers are unaware of the content-type and content-disposition of the target link until after it unloaded the current page. The new TargetDownload option is implemented using the new HTML5 download attribute or, if not supported, by targeting a hidden iFrame contained in the page.
- The included SQLite version was updated
-
The SQLite version bundled with Wt::Dbo has been updated to version 3.8.10.1. The changelog can be found here
- Support for seconds editing in WTimePicker
- WTimePicker was missing the seconds, we've also added the setSecondStep() method.
- WCheckBox::setPartialStateSelectable()
- Before it was only possible to set the partial state of the WCheckbox when creating the Widget.
We've added a method WCheckBox::setPartialStateSelectable(bool) which will allow the user to select indeterminate state. This is false by default;
- New client side connection monitor
- The WApplication::setConnectionMonitor() method will let the user register a Javascript object that will be notified on connection changes (connection, disconnection, websockets enabled/disabled..)
The monitor will trigger the onChange method of the provided Javascript object
- Support for custom HTML tags for a widgets
- We've added WWebWidget::setHtmlTagName() that will change the current html tag instead of using the one chosen by Wt by default. This allows the user to create widgets that are not provided by Wt, such as for example semantic tags.
- Wt::Dbo: allow to forward declare related classes
- It is now possible to forward declare all classes that are being referenced in a belongsTo(), hasOne() or hasMany() relation, helping to reduce the compile time pain of Wt::Dbo.
Release 3.3.4 (Mar 25, 2015)
This release has a focus on bug fixes but also one or two new features,
of which the following are the most notable:
-
Support for dedicated session processes with wthttp connector.
-
Until now, only the FastCGI connector allowed the use of dedicated
processes for individual sessions, by spawning a new process for
each new session. This functionality has also been added to the
wthttp connector. In this implementation, the manager process will
act as a reverse proxy to the dedicated session processes.
This has as major benefit that there is no longer a choice between
dedicated session processes on the one hand (supported by FastCGI)
and support for WebSockets on the other hand (supported by the
built-in httpd). In fact, there remains little reason to prefer
FastCGI over the built-in httpd: in those situations where you
want a proper http server as a front-end, you can still use
HAproxy or NGINX (or Apache, if you must) as a reverse proxy to
wthttp.
-
WIdentityProxyModel
-
This new proxy model simply forwards the structure of the source
model, without any transformation, and can be used for
implementing proxy models that reimplement data(), but retain all
other characteristics of the source model.
-
Chart::WAbstractChart::setAutoLayoutEnabled()
-
Until now, you were responsible for configuring the padding around
the chart area to accommodate for axis labels, titles, and
legend. While this is still the default behaviour, we added an
option to let the chart derive the required padding (using
approximate font-metrics available server-side).
-
Chart::WCartesianChart::setAxis()
-
Whereas previously a chart axis was a "value class", it is now a
proper polymorphic class, and you can provide your own
implementation. In this way you can customize things like for
example label strings.
-
Several new features in the 3D charts library.
-
Release 3.3.3 (May 27, 2014)
This release has a focus on bug fixes but also one or two new features:
-
Improved Meta header support.
-
Because WApplication meta header API was restricted to only work
in certain circumstances, we have now added the ability to define
meta headers (with the option to apply them to specific user agents)
also in the configuration file.
-
WWidget::setDeferredToolTip()
-
This function is an alternative to setToolTip(), useful when a
tooltip text is not trivial to fetch or create. Using this
function, the tool tip (HTML) text can now be loaded on-demand
instead of needing to be preset on (each) widget. This also works
for tooltips set from a WAbstractItemModel using the
new ItemHasDeferredTooltip
item flag.
-
WLineEdit::setInputMask()
-
Support for input masks was added, which guides the user to enter
data in the correct format.
Release 3.3.2 (March 12, 2014)
This release has a focus on bug fixes and a few larger new developments.
A) New classes:
-
3D Charts
(Chart::WCartesian3DChart, ...)
-
A 3D charting library was added, based on
WGLWidget, and integrated
with the existing 2D charting framework.
-
Dbo::JsonSerializer
-
This is a utility which serializes Dbo objects (including
relations) to JSon, leveraging the same persist() function used
for serialization to the database.
B) Main improvements:
-
WBootstrapTheme
-
Support for bootstrap version 3 was added, so now you have the
choice between bootstrap version 2 or 3. Needless to say, you
should probably target version 3 for new development work if you
can live with its restricted browser support.
-
WGLWidget
-
Next to the existing client-side WebGL-based implementation, a
server-side OpenGL-based implementation was added for fallback
scenarios where WebGL is not available, or when scene complexity
is so big that a server-side solution is simply better performing
because of lower bandwidth needed.
-
WRasterImage
-
Next to the GraphicsMagick-based implementation, a skia-based
implementation has been added (which provides much higher
performance most notably on Windows platforms).
-
WString
-
Until now, Wt defaults to the C++ global locale for conversion
between a string literal (std::string, const char *) and
WString. In practice, UTF-8 is an (increasingly) better choice
since UTF-8 is a pragmatic encoding covering the entire Unicode
range, and the encoding used by the library throughout. We've now
added a setDefaultEncoding() function which can be used to
configure the default encoding as UTF-8.
-
wthttp HTTP/WebSockets front-end server
-
We've given the http front-end a much needed overhaul, making it
deal better with long-lived connections typical for WebSockets
applications, and fix some nasty issues at the same time.
We also took the opportunity to optimize its performance by
reducing the number of system calls for writing request
responses, and by avoiding memory allocations during request parsing.
C) Non-backwards compatible changes
-
WDatePicker,
WDateEdit
-
The date pickers will now default to interpreting a single click
as a date selection and also closing the calendar.
Release 3.3.1 (October, 16 2013)
This release has a focus on bug fixes and other cleanups after the big
changes that went into 3.3.0.
A) New classes:
-
WLocalDateTime
-
So far, the library only provided date/time classes that dealt with
UTC time (or that at least is the intended use). In this release
we have added functionality to also deal with date's in a specific
time zone, which includes this new type as well as improvements in
WDateTime to convert to local date time, and time zone information
in WEnvironment and WLocale.
B) Main improvements:
-
WComboBox
-
The combo box now interprets LevelRole data to display headers
(using HTML <optgroup< elements). Another improvement is
that now the combobox saves its single selection while the model
is updated.
-
WDialog
-
Modal dialogs can now be created and destroyed in any order
without confusing the 'silk screen'. We now also consistently
interpret an enter press in the dialog to invoke the default
button added to the dialog footer (if there is one).
-
WMessageBox
-
Several improvements include the ability to indicate what buttons
are the default and escape buttons with setDefaultButton() or
button->setDefault() and setEscapeButton(), and the (long overdue)
implementation of icons!
-
WTextEdit
-
We've added support for TinyMCE 4.
-
Signal
-
For boost versions 1.52 or later, we now support the
Boost.Signals2 library for the signals implementation.
-
Render library
-
We've added a CSS style sheet parser which will parse and apply
style rules in <style> blocks (or loaded through the API),
and expanded CSS support to improve table rendering
(including border-collapse border model and repeated table
headers), relative/absolute positioning, and page-break-before/after
support.
-
Auth::AbstractUserDatabase
-
A setIdentity() method was added to modify an existing identity
(e.g. username) and updateAuthToken() was added to update an
existing token (e.g. keeping the expiration time but changing the
hash).
-
Dbo::Query
-
Added a reset() function which resets previous bound arguments.
-
Dbo::QueryModel
-
The model now implements toRawIndex() and fromRawIndex() methods to
allow selection to persist across layout changes (e.g. resorting).
-
Wt::Json (JSON library)
-
We've added serialization functions to complement the parsing API.
-
Wt::Mail (SMTP library)
-
We've added attachment support, and optional indication of the local
sender date.
C) Non-backwards compatible changes
-
WDate,
WDateTime
WTime
-
We've deprecated the exceptions (Invalid[Date][Time]Exception)
that were thrown by these classes when one attempted to compute or
use an 'invalid' value. These exceptions are no longer thrown.
Instead, we now documented what value
(usually 'null') is returned when one attempts to do operations on
such a date/time class, which makes the behaviour more consistent
with how Qt's equivalent classes behave.
-
WMessageBox
-
The buttons() method has been renamed to standardButtons(), and
buttons() now return the actual list of added buttons.
Release 3.3.0 (April, 8 2013)
This release focuses on a reorganization of Wt's theme
infrastructure, with the objective of
supporting Twitter's
Bootstrap CSS framework as a new theme. At the same time we've
added a number of widgets for which Twitter Bootstrap provides
styling.
It is our intention to support the Bootstrap theme (or more
specifically, the Bootstrap class names) alongside the themes we
already supported (which are based on our own class names). Ignoring
what Bootstrap brings, you should be able to upgrade to this release
without too much trouble, although you may need to adapt some CSS
stylesheets as we did reorganize a number of things which were
required for Bootstrap and were a good idea for our own CSS
stylesheets too.
A) New classes:
-
WTheme,
WCssTheme,
WBootstrapTheme,
-
Theme support classes for Wt. The role of a theme is to:
- Load the CSS stylesheets for a new session
- Annotate newly created widgets with appropriate style
classes
-
WDateEdit
-
Functionally almost the same as a WDatePicker, this class
specializes WLineEdit and is thus a WFormWidget, making it much
easier to use in WTemplateFormView.
-
WLocale
-
This class supports localization for number formatting and
extends the simple localization support we had in the previous
versions of Wt (which as only effect had the selection of
a different language for the resource bundles). It's main
added value of native C++ support for localization is that it
also affects client-side handling and parsing of number values,
i.e. in WIntValidator and
WDoubleValidator.
-
WNavigationBar
-
A navigation bar styles a menu as a typical top-level bar
(currently only styled in the Bootstrap Theme).
-
WPopupWidget
-
A base class to simplify the creation of popup widgets that
typically assist in editing or provide circumstantial information
for another widget.
-
WSplitButton
-
A split button, which combines a button and a popup menu
(currently only styled in the Bootstrap Theme).
-
WToolBar
-
A button tool bar (currently only styled in the Bootstrap Theme)
-
Dbo::MySQL
-
A MariaDB/MySQL backend for Wt::Dbo. This is based on the work
from Paul Harrisson who maintained this backend so far outside the
Wt distribution. The backend has been designed for MariaDB, but
should work fine for MySQL as well.
B) Main improvements:
-
Mail::Message
-
Added API support for additional SMTP headers.
-
WDatePicker,
WSuggestionPopup
-
The setGlobalPopup() functionality has been deprecated and does no
longer have any effect, since a new improved algorithm is being
used to anchor the popup to the DOM which no longer requires this
workaround.
-
WDialog
-
Addition of a footer() method that returns a container for dialog
footer elements, typically buttons.
-
WFormModel
-
Addition of a validator() function that returns the validator for
a field set using setValidator(),
-
WGLWidget
-
Support for binary transfers which avoids serialization and
deserialization of floats to text.
-
WPushButton
-
A push button can now act as a toggle button, using setCheckable()
and related API (currently only styled in the Bootstrap Theme) and
can be linked to a popup menu using setMenu().
-
WStackedWidget
-
When switching between current widgets, the stacked widget will
now record and restore the current scroll position, providing a
much improved user experience when using the stacked widget for
the 'main' contents of an application.
-
WStringListModel
-
Full support was added for storing data of all roles, lifting the
requirement to use another model such as WStandardItemModel for
simple MVC widgets like WComboBox or WSuggestionPopup simply to be
able to store UserRole data.
-
WTemplate
-
Added a new standard function (Functions::block) which allows the
definition and use of a macro block inside a placeholder, which is
in particular useful for forms which have repetitive formatting
for each field.
-
WTemplateFormView
-
Several API improvements: A new setFormWidget() allows the
definition of the form widget for editing a field which
is a more useful alternative compared to reimplement
createFormWidget(). It also allows the optional
definition of functions to update the view/model values, which
avoids the need for specializing updateViewField() and
updateModelField() these latter two functions have been deprecated
in favour of two new functions updateViewValue() and
updateModelValue() which only update the value but not other
aspects such as visibility, validation state, or messages.
-
Built-in httpd improvements
-
A redundant copy operation of the response generated and sent by
Wt has been removed, using scatter-gather I/O implemented by
boost::asio instead.
C) Non-backwards compatible changes
-
WMenuItem
-
While in previous version of Wt, this class was only a data class
that held the information related to an item, in 3.3.0 we modified
this so that this class represents the widget itself. If you were
redefining protected methods to customize the widget
(i.e. createItemWidget() and updateItemWidget()), then this will no
longer work as expected. The new system should be easier to
customize (since you can simply specialize WMenuItem itself).
In addition, we've simplified the rendering of a menu item so that
a redundant layer of spans (or div's) has been removed. It makes
the menu more consistent with the way CSS designers expect a menu
to rendered, and this was done (you can guess the theme of this
release by now ?) to be compatible with bootstrap's CSS styles.
-
WApplication::locale()
-
This now returns a WLocale object instead of the string
designation of the locale (which you can query by calling name())
on the locale object.
-
WCalendar
-
The markup for this class has changed, and thus customized CSS
will need to be updated.
-
WPopupMenuItem
-
The popup menu item class has been merged with WMenuItem (and
WPopupMenu is now a specialized WMenu). This should not have
noticeable API changes, except for the changes in markup and CSS
documented above.
-
WTreeNode,
WTreeTable
WTreeView
-
The markup for tree rendering has been changed (to using nested
unordered list instead of nested tables), and thus customized CSS
will need to be updated. The only API consequence is that
WTreeNode::labelArea() is no longer returning a WTableCell but
instead a WContainerWidget.
-
WTreeView,
WTableView
-
Event handling (clicked(), doubleClicked(), ... ) has been
generalized: events that are not generated on an item (but for
example in empty space below the items) will now also
generate these events, but then with an invalid model index.
You may thus need to adapt current code to check whether the model
index that is returned is valid.
Release 3.2.3 (November, 1 2012)
This release contains mostly bug fixes and one new feature: a payment
processing API.
A) New namespaces:
-
Wt::Payment (payment handling)
-
This namespace contains services and back-end classes for dealing
with online payment brokers. At the moment there is support for
PayPal's Express Checkout service.
B) Main improvements:
-
Layout improvements.
-
If you had massive trouble migrating to 3.2.2 because of the
layout rewrite, then you'll appreciate the efforts we've made to
make the layout algorithms in 3.2.3 much more robust and
consistent.
-
Dbo::QueryModel:
added a mechanism for stable row data.
-
A common nuisance when working with the QueryModel (which
retrieves data from the database as needed), is that concurrent
database modifications such as insertions of new data, may
interfere with the model's mapping of rows to objects (this is
in fact a common problem with most ORM's indeed). This mapping
may be important, especially when you want to process the user's
selection of one or more rows selected by the user, in e.g. a
table view. We've added a mechanism to assure that one can
request the model for data at a given row, which is guaranteed
to be the same row that has been previously retrieved, using the
stableResultRow() method. It works by default for simple queries
(returning data from one table), but can be easily customized
for more complex queries.
-
Render library:
improved support for %-based block sizes and table rendering
-
Support was added for %-based sizes for block widths and table
cell widths. In addition, table rendering in Wt::Render has been
improved to support repeating headers (<thead> sections)
for multi-page tables, and explicit page breaks (using the css
page-break-after/before properties).
C) Non-backwards compatible changes
-
Dbo::backend::Sqlite3
-
We've changed the implementation of the storage ISO8601AsText
format for time stamps (datetime). In the new, corrected,
implementation, we generate dates using 'T' as the separator
between date and time (as mandated by ISO8601), while the old
behaviour used a space (' ') instead as the
separator. Sqlite3 supports either format equally. This may
however break some applications which use queries for an exact
date (or a date comparison), as the results may be affected.
The old behaviour is still available as PseudoISO8601AsText,
which can be configured using
connection.setDateTimeStorage(Wt::Dbo::SqlDateTime,
Wt::Dbo::backend::Sqlite3::PseudoISO8601AsText)
Release 3.2.2 (July, 23 2012)
This release contains mostly bug and feature improvements, but
also a rewrite of the layout managers in Wt (WBoxLayout and
WGridLayout), and this comes with some changes in (in most cases
previously undefined) behaviour.
A) New classes:
-
WSslInfo
-
Class containing information on a client-side certificate that may
have been configured for a SSL connection, and which can be used
for authentication (accessible from
WEnvironment).
-
Wt::Dbo::weak_ptr
-
A weak variant of Wt::Dbo::ptr which is used to implement
One-to-One relations (see also
Wt::Dbo::hasOne()
).
B) Main improvements:
-
Rewrite of WBoxLayout, WGridLayout
-
The layout managers have been reimplemented, to address various
issues with the old implementation, including API (in particular the wonky
side-effects of AlignTop | AlignJustify) inconsistencies and bugs.
The new implementation no longer uses tables when JavaScript
is available, but instead using JavaScript-based layout with
absolute positioning. The table-based implementation is still kept
for plain HTML sessions (and progressive bootstrap). The code now
uses exactly the same layout logic for both horizontal and
vertical layout (but giving precedence to horizontal layout) and
should be much more consistent (and perhaps also more
performant). However, because of the many complexities and
problems with the old code (inconsistent behaviour), you may see
issues while upgrading. Please see the "Non-backwards compatible
changes" below for hints on how to deal with this.
-
WAbstractItemView
-
A drag & drop mime-type can now be specified on a per-item
basis using a new ItemDataRole,
and the mime-type for the entire selection is computed
from these individual mime-types.
-
WInteractWidget
-
A new method setMouseOverDelay() allows to specify a delay for
generating the mouseWentOver() event.
-
Auth::AbstractUserDatabase
-
A new method deleteUser() was added, which deletes a user and all
related authentication information.
-
Chart::WCartesianChart
-
A new method setAxisPadding() was added, which configures the
amount of adding between the chart area and the axes.
-
Chart::WDataSeries
-
A new method setCustomMarker() was added which allows the use of a
user-defined path for the markers. A new role
MarkserScaleFactorRole was added which allows overriding the
marker size based on item model data.
C) Non-backwards compatible changes
-
WBoxLayout, WGridLayout
-
While migrating old code to this version, here are some tips:
Alignment flags
Previously, specifying an alignment for a widget in a
layout, or for the layout when set to a container, had a double
meaning. Not only would it implement the given alignment but also
revert to passively letting HTML layout decide the layout of the
contents, and adjust the parent (layout respectively container)
accordingly. This had all kinds of side effects such as not
propagating the size of layout-size-aware widgets and quirks in
the vertical alignment.
WContainerWidget::setLayout(layout, alignment) has been
deprecated and will be removed from a future release. This call
was almost always used to let the parent container resize to fit
the size of the contained children, instead of fitting children
in the parent container. This behaviour is now
automatically deduced based on an (empty) size of the parent
container. In case this heuristic does not work, then setting a
non-0 maximum size on the container using setMaximumSize() will
act as a trigger, with the added benefit that the parent will only
be allowed to resize up to a specified maximum size.
An alignment specified in
W(Box/Grid)Layout::addWidget(widget, stretch, alignment) now
purely affects the alignment but has no other side effects. The
preferred and minimum sizes of a child widget or layout is now
always taken into account.
Child item sizes
The layout algorithm is now implemented entirely in
JavaScript, and is more gentle when dealing with a combination
of cells (or columns/rows) that have a stretch factor and others
that don't. Previously, a minimum (or fixed) size would be used
to layout items that do not have a stretch factor. This had for
example as a consequence that a WText would be narrowed down to its
minimum width by using word wrapping throughout. Now, the
preferred size is used for a child item, and shrinking to a minimum
size only if necessary.
Progressive bootstrap
A layout in the first page of an application rendered using
progressive bootstrap will no longer fully upgrade to a full
JavaScript version, but will result in a hybrid (between
table-based and JavaScript-based). If it doesn't work out as you'd
expect, then you should reconsider the use of progressive bootstrap,
or the use of a layout manager in your first page.
Release 3.2.1 (March 16, 2012)
This release contains mostly bug and feature improvements.
A) New classes:
-
WFormModel
-
A model class for forms. These models are used in Wt::Auth as the
basis for RegistrationModel and AuthModel, and allow a more
straight-forward customization of the underlying behavior of these
forms.
-
WReadOnlyProxyModel
-
A proxy model class which allows to share a source model
read-only between multiple sessions.
-
WTemplateFormView
-
A WTemplate-based standard view implementation that works in conjunction
with WFormModel.
-
Auth::AuthModel
-
A model that implements authentication logic.
-
Auth::FacebookService
-
An OAuth-2.0 based authentication service implementation for
Facebook.
-
Wt::Utils
-
This namespace contains a number of utility functions that we
found useful in projects using Wt. They relate mostly to
lower-level encoding and decoding functions: base64-, hex-, html-,
and url-encoding/decoding.
B) Main improvements:
-
WApplication
-
A new method, WApplication::bind(), is useful in combination with
WServer::post() to avoid posting to a method of a deleted object,
leveraging the same life-time tracking as with signal connections.
-
Render library
-
A large number of performance improvements, especially for table
layout and rendering.
-
Chart::WAxis
-
DateScale and DateTimeScale axes have improved auto-configuration of
limits and timesteps, now taking into account the resolution.
-
Dbo::Transaction
-
We've modified the default transaction outcome: a transaction will
now automatically commit(), unless the transaction is being
destroyed (goes out of scope) because an exception is being
thrown, in which case the transaction will rollback(). Previously,
an uncommitted transaction would always rollback() on destruction.
-
Dbo::ptr
-
Added a session() method, returning the session with which the
session has been associated.
-
Shipped SHA-1 implementation.
-
We now ship a SHA-1 implementation with Wt and this thus relaxes
the need for OpenSSL to implement WebSockets and
Auth::SHA1HashFunction.
C) Non-backwards compatible changes
-
WTextEdit
-
Due to backwards incompatibility of IE9, we now require the latest
version of TinyMCE (3.5b1 or later).
-
Auth::AuthWidget
-
A number of API methods that configure and access the configuration
were moved to the new Auth::AuthModel class which can be accessed from
the widget using model().
-
Auth::AbstractPasswordService::AbstractStrengthValidator
-
The API was simplified to be less unorthodox: validate() now
returns a Result that contains all the information for it.
-
Http::Client
-
We've changed the signature of the parseUrl() utility function to
parse the URL into a URL structure instead of a collection of
string parameters.
Release 3.2.0 (November 29, 2011)
This release contains a number of new modules, as well as the usual
batch of bug
fixes and small feature improvements.
In this release we also change the WValidator API in a way that it
is likely to break existing applications.
A) New namespaces:
-
Wt::Json (JSON handling)
-
This namespace contains classes (Object, Value, Array) which map
the JSON types in C++. It also contains a parser to deserialize
JSON. A writer to serialize to JSON hasn't been added yet.
-
Wt::Mail (SMTP protocol)
-
This namespace contains a Client to send mail messages. It is
currently offering only limited functionality w.r.t. SMTP protocol
handling, but contains enough functionality to send standards
compliant plain-text/HTML mails, with full support for unicode.
-
Wt::Auth (Authentication)
-
This namespace contains model and view classes for
authentication. It implements password authentication using best
practices, email verification, remember-me tokens, and provisions
support for federated login with an implementation of OAuth 2.0
for authentication using third party identity providers.
We expect that the API may still evolve, especially with
respect to OAuth 2.0 (which is a draft protocol), and its use
for OpenID Connect, which is the main use case for OAuth within
the authentication module.
B) New classes:
-
WException
-
We have cleaned up the use of exceptions within Wt. We have
converted numerous cases where an exception used to be thrown to
error logging, if the exception was thrown to indicate an API
problem. When the API problem is not resulting in a corrupt state,
we now log the error instead of terminating the session. All other
cases now use an exception that implements WException. This does
not affect situations where a std::exception was advertised in the
API.
-
WIOService
-
Previously, boost::asio was used only in the built-in httpd as a
portable asynchronous I/O reactor implementation. We have now
moved this into the Wt library itself, where it is now used
instead of a dedicated thread pool for dispatching requests (and
other server events), and where it is also used for asynchronous
I/O by e.g. the Http::Client.
The WIOService specializes a boost::asio::service, and integrates
the thread pool that runs the service.
-
WStringStream
-
This is a utility class that we have used since long in Wt. It is
a more efficient replacement for std::stringstream, with mostly a
compatible API (at least for our purposes). For our purposes it is
typically a factor of two or more faster.
-
Http::Client,
Http::Message
-
We have added an implementation of a Http(s) client. The client
is intended for consuming web services in Wt, and handles GET or
POST requests. It is not suitable (yet) for large responses, since
it buffers the entire response internally.
The client uses asynchronous I/O, using the WIOService that is
found in the current WServer instance.
-
Dbo::Firebird
-
Lukasz Matuszewski contributed a Firebird backend
implementation, thanks !
C) Main improvements:
-
WAbstractItemView
-
Added a setHeaderWordWrap() method which configures header text
word wrapping, and changed setHeaderAlignment() so that it now
allows to change both the horizontal and vertical alignment. This
replaces the previously interwoven API for both features using the
multiLine parameter in setHeaderHeight(), which has been
deprecated. The rendering of the header items has been
reimplemented, simplified, and cleaned up in the process, avoiding
rendering problems on IE browsers.
-
WApplication
-
Two new methods, deferRendering() and resumeRendering() can be
used to defer the rendering phase in response to the current
event-loop request. This is useful for situations where you are
waiting for an asynchronous operation to complete, but want to
handle this synchronously in the user-interface (i.e. blocking the
interface until the operation completes). While this is not a good
idea in general, it may be useful if you can guarantee that the
event will arrive within an acceptable time (e.g. 1 second). This
effectively stalls the response to the current request, but avoids
blocking threads in the process.
-
WDialog
-
Added setClosable(), which adds a close icon into the title bar.
-
WFormWidget
-
We have cleaned up the use of exceptions within Wt. We have
converted numerous cases where an exception used to be thrown to
error logging, if the exception was thrown to indicate an API
problem. When the API problem is not resulting in a corrupt state,
we now log the error instead of terminating the session. All other
cases now use an exception that implements WException. This does
not affect situations where a std::exception was advertised in the
API.
-
WLogger
-
We have reorganized the logging within Wt. Internally, a number
of macros are now used for logging, with as default
implementation our own (simple) logger, but which can be
redefined to use instead another logging framework of your
choice, as some have rightfully requested.
But we've also improved our logger so that it now can be
configured to filter only certain information, based on type and
scope. This is mostly useful for debugging and development of Wt
itself, since it allows us to switch on debugging output, in a
fine-grained way, in a debug build.
Finally, a new global function has been added (Wt::log()) which
selects an appropriate logger for logging and is more convenient
than WApplication::log() which required an application instance.
-
WTemplate
-
Arguments to bound functions are now parsed and passed to
the resolveString() methods.
Two new constructs have been added: conditions and
functions. Conditions allow certain parts of a template to be
skipped or included based on a bound condition. Functions are
useful to automatically resolve certain variables, two built-in
functions are implemented: one to resolve strings in a message
resource bundle ("tr"), and another to resolve the id of a bound
widget ("id").
-
Dbo::collection<T>
-
We've added front() methods that return the first element.
-
Built-in httpd connector
-
We have expanded the WebSockets implementation to cover newer
versions of the WebSockets protocol (draft): next to 00, we now
also support 07, 08 and 13 protocols (with draft-17 semantics).
-
Configuration
-
On UNIX-like platforms, and using the built-in httpd connector,
SIGHUP is caught in the WServer::waitForShutdown() utility function,
and the configuration file (wt_config.xml) is reread.
-
Several security improvements
-
- DoS mitigation
- We have added two measures to prevent DoS attacks that try
to exhaust the server by spawning sessions. This is in
particular a risk when deploying using the progressive bootstrap
method, since then a plain HTML session can be spawned with a
single request.
- Plain sessions may be limited to constitute only a
fraction of the total number of sessions. This is configured
using the <plain-ajax-sessions-ratio-limit>
configuration option.
- Ajax sessions need to confirm their "intelligence" by
solving a puzzle which requires them to properly parse the
(ever-changing) JavaScript and HTML.
- Compromised session ID risk reduction
-
A compromised session ID no longer can be used to hijack that
session.
- A full page refresh (using the session ID to rerender
the current application state) is no longer allowed unless
both client IP address and user-agent are unchanged. To
still enable page refresh in this situation, you may
configure the use of a cookie which can be used to confirm
the original browser (although that cookie will not be
used for session tracking), using the
<session-id-cookie> setting.
-
The session ID cannot be used to POST events to an Ajax
session, since these require proof of other ever-changing
context specific information, notably a pageId and ackId.
D) Non-backwards compatible changes
-
Build options
- The HTTP_WITH_SSL option has been removed, and is now replaced
by WT_WITH_SSL -- OpenSSL is now a dependency of Wt inherited by
the httpd.
-
WValidator
-
We broke the validate() method, to return a new WValidator::Result
instead of WValidator::State. The main improvement is that the
validation may also return a text which contains information on
why validation failed. This makes the API consistent with the
client-side API, and obviously much more useful. It will break
existing application that call validate() or have reimplemented
validate() in a custom validation class.
-
WTestEnvironment
-
This class has moved to a pseudo-connector library
(libwttest). This was needed to be able to use asynchronous I/O
(such as Http::Client) in test cases, which rely on a WIOService
furnished by a WServer instance.
Release 3.1.11 (September 23, 2011)
This release
contains many
bug fixes and a few new features.
A) New classes:
-
WLink
-
This class unifies the different link types used in Wt, in a
single value class. Depending on the context, a link may refer to
a URL, a resource, or an internal path. We've updated the API
throughout to replace the function overloads for these different
cases with a single usage of WLink, simplifying the API (but don't
worry, we left the old methods, albeit deprecated).
-
WMediaPlayer
-
A media player has been added which provides a unified framework
for playing audio and video, and which deals with cross-browser
issues (choosing a suitable implementation per browser). We've also
renamed WHTML5Audio, WHTML5Video, and WHTML5Media to WAudio,
WVideo and WAbstractMedia respectively (since well, everything
will eventually be HTML5, no ?).
B) Main improvements:
-
WResource,
Http::ResponseContinuation
-
Currently, you can already stream the output of a big resource in
little chunks, using a continuation to resume sending the next
part. We've now added API methods
(WResourceContinuation::waitForMoreData() and
WResource::haveMoreData()) to allow a resource to suspend its
response because it is currently lacking more data, to continue
later when new data is available (and without tying up a thread).
-
WDialog
-
Added an option setResizable() which puts a resize handle in the
bottom right corner.
-
WPopupMenu,
WPopupMenuItem
-
Added a triggered() signal, and an option to automatically cancel
the popup menu when the mouse leaves the menu (after a
delay). We've also added the possibility to link a popup menu item
with a WLink, and the option to make the item which has a submenu
item also itself selectable.
-
Dbo::Session
-
The load() method has an additional, optional parameter, to force
rereading the copy from the database.
-
Dbo::collection<C>
-
Added a count() method which uses a query to determine whether the
collection contains an element.
-
Test::WTestEnvironment
-
Added dialogExecuted() and popupExecuted() methods which allow to
interact with a reentrant eventloop from a test plan.
C) Non-backwards compatible changes
The item data roles InternalPathRole and UrlRole have been removed,
and replaced by a LinkRole (which contains a WLink value instead).
D) Deprecated API
With the introduction of WLink, the following API is being deprecated
(although it can be argued that some of these may be kept for
convenience):
-
WAbstractArea::setRef(): use WAbstractArea::setLink() instead.
-
WAbstractArea::ref(): use WAbstractArea::link() instead.
-
WAbstractArea::setResource(): use WAbstractArea::setLink() instead.
-
WAbstractArea::resource(): use WAbstractArea::link() instead.
-
WAnchor::setRef(): use WAnchor::setLink() instead.
-
WAnchor::ref(): use WAnchor::link() instead.
-
WAnchor::setResource(): use WAnchor::setLink() instead.
-
WAnchor::resource(): use WAnchor::link() instead.
-
WAnchor::setRefInternalPath(): use WAnchor::setLink() instead.
-
WImage::setImageRef(): use WImage::setImageLink() instead.
-
WImage::imageRef(): use WImage::imageLink() instead.
-
WImage::setResource(): use WImage::setLink() instead.
-
WImage::resource(): use WImage::link() instead.
-
WStandardItem::setInternalPath(): use WStandardItem::setLink() instead.
-
WStandardItem::internalPath(): use WStandardItem::link() instead.
-
WStandardItem::setUrl(): use WStandardItem::setLink() instead.
-
WStandardItem::url(): use WStandardItem::link() instead.
The following classes have been renamed, and the old name is being
deprecated:
-
WHTMLMedia is now WAbstractMedia.
-
WHTMLVideo is now WVideo
-
WHTMLAudio is now WAudio
Release 3.1.10 (July 8, 2011)
This release contains a mix of new features and bug fixes
A) New classes:
-
WAnimation
-
We have added support for animations to show or hide widgets (used
in WWidget::setHidden(),
and WStackedWidget). These
animations will only be used when the browser supports CSS3
animations (at the moment of writing that includes latest Firefox,
Chrome and Safari releases).
-
WStreamResource
-
Dmitriy Igrishin factored this out of the WFileResource since most
of its functionality (continuations, range support) could be
generalized to streaming from a std::istream.
B) Main improvements:
-
Allowing multiple WServer instances.
-
Apparently for no good reasons at all, some singletons were still
around which prevented you from instantiating
multiple application servers. Now
you can (but only using the built-in httpd) instantiate multiple
servers side by side in the same process, which may server the
same or different web applications over different ports. A feature
example (
multiple_servers
) shows how that works.
-
Internal path encoding in WTemplate and WText
-
The
new
setInternalPathEncoding()
method will, if needed, enable re-encoding of <a> anchors
which reference internal paths consistent with how in the
current session internal paths need to be dealt with (which
depends on whether the browser supports Ajax and HTML5 History).
Since this requires an additional XML parsing step (but the
rapidxml parser that is used is ... rapid !), it is off by
default.
-
WApplication::findWidget()
-
Like WWidget::findWidget(), but on the whole application,
including widgets outside the WApplication::root().
-
WApplication::changeSessionId()
-
Generates a new session ID for the application. This is useful to prevent
session fixation attacks by changing the session ID when a user has
authenticated successfully.
-
WResource::setDispositionType()
-
This method allows to specify how the browser should preferably
show a (non-HTML) resource.
-
WTable
-
Methods were added
to move
a row
or a
column. In addition we added methods
to WTableRow
and WTableColumn for
accessing cells in the given row or column.
-
WTextEdit
-
Various improvements to allow more flexible access to TinyMCE
settings on a per-instance basis.
-
WWidget::setToolTip()
-
An additional argument was added which may specify the use of
XHTML tooltips, which are implemented using a <div>.
-
Dbo::collection<T>
-
Make insert() and erase() also work for a collection involved in a
1-N relation
-
Dbo::ptr<C>
-
Improved modify() behaviour returns a proxy object which marks the
the object dirty also from its destructor, avoiding situations where
the transaction is flushed during a modification and remainig changes
are forgotten.
-
Dbo::Dbo<C>
-
Added setDirty() and self() methods.
-
Dbo::backend::Sqlite3
-
The packaged sqlite3 version was bumped from 3.6.20 to 3.7.6
C) Non-backwards compatible changes
- The signature of the virtual method WWidget::setHidden() has changed.
-
Probably the biggest breaking change since long, this was needed
to add support for animations. This will break existing code which
specializes the WWidget::setHidden() method. This code should be
updated to pass the WAnimation object.
Release 3.1.9 (April 7, 2011)
This release contains mostly bug fixes and quality improvements.
A) New classes:
-
WAbstractSpinBox,
WDoubleSpinBox
-
Refactored and reimplemented the spinbox control into an integer
and floating point version, which may be implemented either using
a native HTML5 element or a portable Wt implementation.
B) Main new features in existing classes:
-
Internal path handling: HTML5 History API
-
When the browser supports the HTML5 History API, URLs are now the
same for plain HTML and Ajax-enabled session (i.e. without the '#'
trick). This can improve load time and improves the
user-experience.
To avoid problems of resolving resources with relative URLs, a
new property 'baseURL' can be used (that can be configured in
wt_config.xml), which allows all relative URLs be resolved from
the same location.
-
Internal path handling: no ugly internal paths ('?_=/path')
-
The configuration option (--docroot) for the built-in
httpd allows to specify folders with static paths and when doing
so, all other requests are forwarded to the application, which in
turn does no longer need to rely on the ugly '?_=' query parameter
to encode its internal paths.
-
WPdfImage, WRasterImage
-
Improved font support: the library can be optionally built to use
libpango for resolving characters to glyphs. This allows text to
be rendered using a mix of different fonts that all provide only
partial coverage for the entire unicode range. Note that for
WPdfImage, this currently requires use of a libharu fork
(https://github.com/kdeforche/libharu/tree/)
-
WAbstractItemView,
WTableView and WTreeView
-
Implementation of setRowHeaderCount() which fixes the number of
columns that are used as row headers and remain fixed while
scrolling horizontally through the table. This replaces the now
deprecated setColumn1Fixed() API.
-
WRasterImage
-
Several quality improvements: correct rendering of alpha
compositing, text rendering by libpango,
-
WSlider
-
The slider has been reimplemented to allow for using either the
native HTML5 slider control, or the Wt implementation. The Wt
implementation can now also be styled through CSS.
-
WRun(),
WServer::addEntryPoint()
-
The callback function is now a boost::function<> object, allowing
you to bind other variables into the callback function.
-
WServer::post()
-
A safe method to post events to a session, and a useful
alternative to WApplication::UpdateLock. The simplechat and
codeview examples were converted to illustrate this method rather
than the (dead-lock prone) WApplication::UpdateLock approach.
-
WString::trn()
-
Implementation of plural string resolution, with locale-dependent
rules. The implementation provided
by WMessageResourceBundle
allows the same kind of expressions as GNU ngettext().
-
Chart::WAxis::setResolution()
-
Allows to specify the minimum chart axis resolution (contributed by Gaetano Mendola).
-
Dbo::Transaction
-
Fixed an issue with internal inconsistencies after transaction rollback.
C) Non-backwards compatible changes
- Changed i18n keys for
Wt.WDate.Mon-Sun
and Wt.Date.Jan-Dec
-
We were pointed out the fact that the built-in i18n keys for WDate
month names had a collision for the month 'May', which had the
same key for the abbreviated 3-letter variant as the full length
variant. Therefore in this release we reformatted the abbreviated
3-letter variant keys to
Wt.WDate.3.Mon-Sun
and Wt.WDate.3.Jan-Dec
. You will need to update your own
languages copies of these (or better, contribute them and we'll
maintain them for you!).
D) Android and iPad/iPhone targets
This release contains initial work on supporting Android and
iPad/iPhone as targets for deploying Wt applications within a webkit
view widget.
For iPad/iPhone, we added a script that builds Wt as an OSX Framework
which may be used in XCode to build iOS applications.
For Android, we added support for building the library and examples as
shared objects which are packaged together with a small Java project
which instantiates a WebView, into standalone APK files.
This is ongoing work. We need to improve support in Wt for Mobile
Webkit to make the applications look and behave more as native
applications on these devices.
Release 3.1.8 (Feb 4, 2011)
This release contains mostly bug fixes, quality improvements,
and a few new features.
A) New classes:
- WFontMetrics
-
A font metrics class. Font metrics are only available for
WPdfImage, and an implementation is planned for WRasterImage.
- Render::WTextRenderer,
Render::WPdfRenderer
-
A renderer class for a subset of XHTML, useful for e.g.~generating
PDF reports.
B) Main new features in existing classes:
-
WAbstractItemView::setHeaderItemDelegate()
-
Rendering of header cells is now also delegated and can be customized.
-
WAbstractItemView::scrollTo()
-
Scroll to a particular item.
-
WApplication::setLayoutDirection()
-
Added support for Right-To-Left (mirrored) layouts, typically used
with some middle-Eastern languages. In addition to HTML's built-in
support for RTL directionality, layout managers, tables and MVC
tree/table views render their columns in the opposite order.
-
WBoxLayout, WGridLayout, WBorderLayout
-
Empty layout items do longer create padding, and thus padding
collapses around empty items (both horizontally and vertically).
-
WEvent::eventType()
-
Information on the event type may be used during WApplication::notify()
for e.g. detecting user activity.
-
WGoogleMap
-
Added support for Google API version 3, alongside version 2.
-
WPdfImage
-
Added support true type font loading, a UTF8 patch for libharu is
pending to enable full unicode support text rendering.
-
WWidget::setWidth(),
WWidget::setHeight()
-
Convenience methods for resize() for only width or height.
-
Chart::WCartesianChart
-
A number of methods to customize the location and look of the legend.
-
Chart::WDataSeries::setXSeriesColumn()
-
Allow use of a specific X series for each data series in scatter plots.
-
Dbo::belongsTo(), Dbo::hasMany()
-
Support for foreign key constraints (NotNull, OnDeleteCascade, etc...).
-
Dbo::Session::rereadAll()
-
Can be optionally given a single table name to reread (discard) all object
data from a single class/table.
-
Dbo::sql_value_traits<bool>, Dbo::sql_value_traits<long>
-
Added mappings for C++
bool
and long
types.
C) API and other changes:
-
CORS (Cross-Origin Resource Sharing)
-
A communication method between browser and server is now chosen
based on the needs (same origin or cross-origin), and based on
browser support. Cross-Origin requests are now supported for both
Ajax and WebSockets, and are are chosen if available and needed,
reverting to dynamic script-tags otherwise.
The WApplication::setAjaxMethod() has no effect anymore, and has
been deprecated.
-
Bootstrap process has changed.
-
While tracking bootstrapping problems on IE8 (resulting in a blank
page instead of a shiny app), we not only found a good workaround
for that, but also found a way to implement the default bootstrap
mode so that the stylesheets are applied before the application is
rendered. This solves the annoying flicker you experienced with
the default bootstrap mode, and also allows us to remove a number
of workarounds for IE. As a result of various cleanups, more CSS
stylesheet rules have been pushed out to the external wt.css
(theme) stylesheet. If you've created your own theme, you will
need to take note.
-
Wt::BrushStyle
-
Wt::WBrushstyle has been renamed to Wt::BrushStyle. This makes it
consistent with the naming conventions of other enums. Sorry, our
mistake !
Release 3.1.7 (Nov 26, 2010)
This release contains mostly bug fixes, quality improvements,
and a few new features.
Note: the package was updated (3.1.7a) on Nov 30 to fix a layouting
regression.
A) New classes:
- WGLWidget
-
A preview of WebGL support in Wt (work in progress).
B) Main new features in existing classes:
-
WAbstractItemView
- Added API for hiding columns.
-
WCartesianChart,
WPieChart
-
Added support for ToolTipRole data, using WAbstractArea interactive areas.
-
Dbo::Session::rereadAll()
-
Reread all transient objects, as a catch-all solution to stale
data (data modified in another session).
-
WInteractWidget
- Added support for touch and gesture events (Mobile webkit).
C) Misc:
-
WebSocket protocol support (experimental)
- Use of WebSocket for communication between browser and server
can now be used, by enabling <web-sockets> in the
configuration file (we're likely to turn this on by default in a
future version. There is automatic fallback to the current
XMLHttpRequest based communication if WebSockets are not available
or communication could not be established. WebSockets is only
available using the built-in httpd server (which is now also a
WebSocket server).
-
Build improvements
-
- Provide a workaround for broken g++ compiler shipped in Ubuntu
Maverick
- Provide support for building without using
std::wstring (-DWT_NO_STD_WSTRING) or std::locale
(-DWT_NO_STD_LOCALE=OFF) support.
Release 3.1.6 (Oct 29, 2010)
This release contains a healthy mix of bug fixes, quality improvements,
and new features. And hopefully no regressions :-)
A) New classes:
- SyncLock<Lock>
-
A dead-lock avoidance adaptor for a Boost mutex lock, which provides
a controlled way of releasing the current application lock.
- WProgressBar
-
A progress bar, contributed by Thomas Suckow.
- WSpinBox
-
A spin box.
- boost_any_traits<Type>
-
A traits class for customized interpretation of data stored in a
boost::any. You can register a new type using registerType<Type>.
B) Main new features in existing classes:
-
Native support for MSIE 9
-
MSIE 9 (Beta) is now supported in all its goodness, including support
for HTML5 canvas and (almost working) support for SVG.
-
WApplication::UpdateLock
- The lock is now a RIAA lock, getUpdateLock() has been deprecated.
The lock needs also to be tested against validity (using operator bool()):
when invalid the session that it is trying to lock is being destroyed.
-
WApplication::setConfirmCloseMessage()
- Provide the user with a message to confirm navigating away from the
application.
-
WApplication::unload()
- Rather then waiting for the session to expire, an application
that is navigated away iis now notified of this and will by
default
quit()
.
-
WApplication::addMetaHeader()
- Can now be used to specify "http-equiv" meta headers too.
-
WDatePicker::changed()
- I wonder how we ever did without.
- WAbstractArea::mouseWheel(),
WInteractWidget::mouseWheel(),
WMouseEvent::wheelDelta()
-
Added mouseWheel() event.
- WFileUpload
-
Added support for the simultaneous upload of multiple files (HTML5
"multiple") attribute and showing a progress bar to show upload
progress.
- WFormWidget::hasFocus()
-
Returns whether the widget currently has the keyboard focus.
- WHTML5Media
-
Added events to catch play, pause, play-back progress and volume
changes.
- WLineEdit, WTextArea
-
Added
currentPosition()
, selectionStart()
,
selectedText()
, and hasSelectedText()
methods to retrieve
the current cursor position and selection.
- WPushButton::setRef()
-
Utility method to create an anchor that looks like a button, or a
button that behaves like an anchor, depending on your point of
view. There is also
setResource()
to set a resource as
target.
-
WResource
- Added API for upload progress tracking.
-
Http::Request
- Added support for HTTP request byte ranges, and this is now
interpreted by both the WFileResource and built-in httpd for static
files.
-
Http::Response
- Added
setContentLength()
which allows you to specify the
length of the response in advance, proving a better user experience
for large downloads.
-
Dbo::Session::query()
- Switched to a more complete Boost.Spirit parser for SQL queries, which
understands most of the SQL syntax, including functions,
"with ... select ... ".
-
Dbo::QueryModel
- Added support for custom column header names and changing the
underlying query using setQuery() while preserving the current
column definitions.
-
Dbo::SqlStatement
- Added boost::posix_time::time_duration type support.
-
Dbo::sql_value_traits<WTime>
- Added template specialization for WTime.
Release 3.1.5 (Sep 10, 2010)
This release contains mostly bug fixes.
A) Main Changes
- WGridLayout,
WBoxLayout
- Optimized client-side rendering performance. Previously, every layout
manager used would automatically slowdown every event because it would try
to relayout each time. This is no longer the case.
- WSocketNotifier
- The socket notifier has been resurrected (it was in a perpetual state
of brokenness) and now works reliably across targets.
B) Changes that may break existing applications:
1) Built-in resource bundles
Starting with this version, Wt uses an internal message resource
bundle for the few strings it provides by itself (like for example
'Ok' for the ok button in a WMessageBox, or the days-of-week in WDate).
Previously, an ugly API was used in
WMessageBox,
WCalendar,
and
WDatePicker
using a boolean 'i18n' parameter in the constructor. All this has now been removed,
and instead the keys for these built-in strings have been documented. If you were
using these classes your application will no longer build, you can simply remove the
internationalization parameter and you will need to fix the keys you used for the
messages according to the documentation.
Any localized strings you use will take precedence over these built-ins.
All affected classes (only those listed above actually have changed API and behaviour) are:
- WAbstractItemView
- the paging tool bar buttons for graceful callback.
- WCalendar
- because of WDate
- WDate and WDateTime
- week days, month names
- WDatePicker
- because of WCalendar and for the close button
- WDefaultLoadingIndicator
- loading text
- WInPlaceEdit
- save and cancel button text
- WMessageBox
- standard buttons
- WLoadingIndicator
- standard buttons
- Validators
- for the messages they display in case of error
2) Other behavioural changes
- WDialog
- Escape will no longer result in the dialog being rejected. You can
enable this behaviour using the rejectWhenEscaped() method.
Release 3.1.4 (Aug 13, 2010)
This release contains several new features, but also a few changes
that break backwards compatibility (but are unlikely to affect an
average application).
A) New classes:
-
WBatchEditProxyModel
- A proxy model that caches editing operations to commit them atomically.
- WHTML5Audio
- Audio support using the HTML5 audio tag.
- WPdfImage
- A WPaintDevice that writes to Pdf (using libharu).
- WRasterImage
- A WPaintDevice that writes to a Png/Gif (using GraphicsMagick).
- ISAPI connector
- (Windows only) a connector that implements the Microsoft ISAPI
API, to integrate directly into Microsoft IIS. On Windows, this is
an alternative deployment option next to the built-in httpd.
B) Main new features in existing classes:
-
WAbstractItemView
- Added support for validators while editing.
-
WApplication
- Added an appRoot() method this returns the value of the
special property "approot" which can in some cases be defined
implicitly by a connector (such as ISAPI), and which allows an
application to reference working files whereas previously it was
assumed that they were in the working directory (CWD).
-
WEnvironment::agent() and related
- Convenience methods that return pre-parsed user agent identification,
should you want to differentiate based on browser.
-
WWidget::addStyleClass(), WWidget::removeStyleClass()
- Added addStyleClass() and removeStyleClass() methods.
-
WMenu, WMenuItem
- Added support for closable and disabled items (not complete,
CSS is lacking for polished theme). Contributed by Dmitriy Igrishin.
-
WModelIndex
- Added support for in-place (destructive) encoding to and
decoding from a raw index, making this less of a hassle for View
classes.
-
WSortFilterProxyModel
- Added support for row insertion/removal.
-
WSuggestionPopup
- Allow usage as an advanced combo-box, with an explicit drop down
button and ability to react to a selection.
-
Dbo::id()
- Support for natural keys (possibly of composite type) next to the
built-in surrogate keys.
-
Dbo::dbo_traits<C>
- By specializing this traits class, you can modify the surrogate id
field name (or disable it), and the optimistic version lock field
name (or disable it).
-
Dbo::Session::query()
- More robust query parsing (of the 'select' part), including
support for "select distinct".
-
Dbo::QueryModel
- Added editing support (editing the model will modify the queried
dbo's).
-
Dbo::query_result_traits<C>
- Added setValue(), create(), add() and remove() methods for modifying
queried results.
C) Changes that break existing applications:
- Dbo::Dbo
-
This class is now a templated with the class name itself, in
order to provide the proper type for the (natural or surrogate) id
field for id(). You will need to replace
class User : public Wt::Dbo { ... }
with
class User : public Wt::Dbo<User> { ... }
- CSS
- The toplevel container used by Wt is now given a
position:
relative
style; this was needed to be able to position widgets
(such as popups) using position: absolute
, but may break
application layouts. You can override this CSS style by adding
.Wt-domRoot { position: static; }
to your application's
(internal or external) stylesheet.
Release 3.1.3 (May 20, 2010)
This release several new features, but also a few changes that
break backwards compatibility (but are unlikely to affect an average
application).
A) New classes:
- SignalBase,
EventSignalBase
- Abstract base classes for signals (these are not actually new,
but they were not yet part of the API).
- WHTML5Video
- Video support using the HTML5 video tag (work-in-progress).
- Dbo::Call
- Class for executing a database call.
-
Dbo::SqlConnectionPool,
Dbo::FixedSqlConnectionPool
- Connection pool interface and implementation.
- Dbo::QueryModel
- An tabular item model for query results.
B) Main new features in existing classes:
- WAbstractItemDelegate
- Added methods for editing: editState(), setEditState(),
setModelData() and closeEditor().
- WAbstractItemView
New editing API: edit(), closeEditor(), saveEditedValue(),
setEditOptions(), setEditTriggers().
Graceful degradation support using a paging navigation bar, which
may be customized by reimplementing createPageNavigationBar().
- WCalendar, WDatePicker
- Added setBottom() and setTop() methods to specify a valid range.
- WInteractWidget
- Added a mouseDragged() event for responding to mouse moves while
a mouse button is down.
- WItemDelegate
- Implements editing using a WLineEdit.
- WMenu
- Can now be used without a contents stack.
- WSuggestionPopup
- Added API to support dynamic server-side filtering.
- WTableView
- New implementation which supports horizontal and vertical
virtual scrolling, column resizing, drag and drop, etc... like
WTreeView.
- Chart::WPieChart
- Supports now also a shadow effect.
- Dbo::collection
- A find() method has been added to refine the query of a many-side relational.
- Dbo::ptr
- A version() method returns the current version.
- Dbo::Query
- An extra template parameter specifies a binding strategy. The
default binding strategy is DynamicBinding, which allows reuse of
the query object, and provides new API to modify the query:
where(), orderBy(), groupBy(), offset(), limit().
- Dbo::Session
- Added support for use with a connection pool. Added execute()
method to execute an SQL statement.
- Built-in httpd
- Support for HTTP Range header and partial content serving.
C) Changes that break existing applications:
- Dbo::sql_result_traits
- This traits class has been renamed to query_result_traits and
its API has changed considerably. This will only impact when you
have implemented a custom traits specialization. The getColumns()
method has been replaced with a getFields() method, and the
loadValues() method has been renamed to load(). A getValues()
method has been added which provides conversion to boost::any's.
- WTableView
- This View class was reimplemented to have functionality
comparable to WTreeView. In the process, we had to abandon the
underlying <table> representation because of rendering
issues with Chrome (of all browsers!), although the WTableView
documentation specifically promised that we would keep this.
Release 3.1.2 (March 26, 2010)
This release contains mostly bug fixes, and a few new features.
A) New classes:
- WShadow
- Class representing a drop shadow effect (see below).
- Dbo/backend/Postgres
- A Postgres backend has landed, contributed by Hilary Cheng.
B) Main new features in existing classes:
- WBoxLayout, WGridLayout
- Addition of horizontal and vertical splitter support (resize handles to
allow the user to adjust the layout), sponsored by Eurofer. The new API
methods are setResizable(), setColumnResizable() and setRowResizable()
- WCalendar
- Improved the API to allow custom cell rendering, and custom handling
of selection. We have also made the API for selection consistent with other
widgets (like WTreeView), deprecating the old API.
- WDateTime
- Added toPosixTime() and fromPosixTime() methods to interoperate with
boost::posix_time::ptime
.
- WFormWidget
- Added a setEmptyText() method to implement a label inside a line edit or text area.
- WPainter
- Added a setShadow() method which defines a drop shadow to be used for subsequent
drawing actions.
- WResource
- Added a setInternalPath() method which allow a resource to be deployed at a deterministic and "pretty" URL.
- WString
- Added constructors that take a std::locale for interpreting a narrow
string in a given locale.
- WWidget
- Added setLayoutSizeAware() and layoutSizeChanged() methods which allow a widget to react to layout size changes.
- Http::Request
- Added access to the request method().
- Http::Response
- Added a setStatus() method to modify the response status.
- Dbo::Session
- Added support for schema qualified tables, in
Session::mapClass() and the joinTable specified in hasMany().
Added API for dropping the schema: dropTables().
Added support for arbitrary queries in Session::query(), including
queries that do not return result or do not select from tables.
- Dbo::field()
- Allow size suggestion for std::string and WString mappings
- Dbo::SqlConnection, Dbo::SqlStatement
- Added support for floating point types, binary data (using std::vector<unsigned char>) and date and date/time types.
Added methods for return dialect-specific information.
Added properties API.
- Dbo::sql_value_traits
- Added support for backend-specific type mapping.
- (internal) DomElement
- Performance improvements in serializing the widgets to HTML
and/or JavaScript
- Built-in httpd
- Added a configuration option
--max-request-size
to
limit the size of a POST instead of the built-in default of 40
MB
Added a configuration option
--max-memory-request-size
to limit the size of a POST that
is handed in-memory. Bigger POSTs are handled using a spool file.
Release 3.1.1 (February 17, 2010)
The minimum boost version is now 1.36.
This release handles mostly bug fixes, with as most visible change
an update of the polished theme, which is now considered
complete.
A) Security fixes:
Because of the following fixes for security problems, we recommend anyone
to upgrade live deployments of his application to the latest version.
- Possible XSS vulnerability
- Fixed a possible XSS attack where a user follows a link to a Wt web
application, taking advantage of unchecked insertions of the URL when
redirecting to the canonical page.
- Possible UTF-8 vulnerability
- Form values and JSignal arguments received from the browser are
now checked for sane UTF-8 encoding.
B) New classes:
- Dbo/Dbo
- An optional base class for a database object, providing access to its
id() and session().
C) Main new features in existing classes:
- WCanvasPaintDevice
- Now implements native text rendering on Firefox and latest
Chrome and Safari browsers
- WInPlaceEdit
- Added a setEmptyText() method which sets the text to be
displayed when value is empty.
- WPopopMenu
- Added an exec(WWidget *location, Orientation orientation) method which
popups the menu besides another widget.
- WSuggestionPopup
- This class is now also style by the CSS theme.
- WTemplate
- Avoids now rerendering of already bound widgets when the
template is rerendered.
- WTree,
WTreeNode,
WTreeTable,
WTreeTableNode
- These widgets are now theme-aware, and tree decoration styling
is provided by the theme. The setImagePack() APIs are now
no-ops
- WWidget
- Added positionAt() method which positions a widget (absolutely) besides
another widget.
- Chart/WAxis>
- Added a setLabelFont() method.
- Http/Request
- Added serverName(), serverPort(), path(), pathInfo(),
queryString(), urlScheme(), in(), contentType(), contentLength(),
userAgent() and clientAddress() methods which expose information
form the HTTP request to WResources.
D) Build changes:
- XML_FEATURES
- This CMake option has been removed, and Mini-XML has been
replaced by a modified RapidXML xml parser (mostly because of the
hard-to-interpret Mini-XML license), but there are also nice
performance improvements.
Release 3.1.0 (December 29, 2009)
This release contains several new features and classes, after a long
period of stabilization that happened before the 3.0.0 release.
A) New classes:
- WAggregateProxyModel
- A model that provides support for drilling down through columns, supported
by WTreeView.
- WCombinedLocalizedStrings
- Combines different localized strings implementations.
- WDateTime
- Combines a calendar date (WDate) and a clock time (WTime).
- WTemplate
- Use an XHTML fragment as a template, with variables that are place
holders for strings or other widgets. See the blog example of how this
class can be used to simplify HTML/CSS based layout of widgets and
contents.
- WTime
- Represents a clock time (0-24 hours).
- Wt::Dbo
- An Object Relational Mapping library. See the tutorial here.
B) Main new features in existing classes:
Most inline CSS styles have been pushed out to an external style
sheet, which may be themed. The "default" theme provides the old look,
while a new "polished" theme provides a less boring (?) look for
several widgets (work in progress). The theme can be set using
WApplication::setCssTheme().
As a result, you will need to deploy Wt's
"resources/"
folder, which contains the themes in
"resources/themes/"
, for
all but the most trivial applications.
- Signal
- Added a template connect() method which may be given any function
object, providing also support for the (future) c++1x lambda functions.
- WCanvasDevice
- Several optimizations to output more concise JavaScript.
- WPaintedWidget
- When width and/or height is not set using resize(), the widget
will now properly react to layout management when put into a layout
manager, triggering a server-side rerendering when needed.
- WSlider
- A sliderMoved() signal was added which is fired whenever the slider is
moved (but not yet released).
- WWidget
- Added a find() method which searches the widget hierachy for a widget
with a particular objectName().
- WServer
- Added an addResource() method to bind static resources to particular
URLs (i.e. resources that are not bound to a specific session).
- Ext::Container
- Will now properly react to layout management from a layout that
is set for a WContainerWidget.
- Ext::FormField
- Added changed(), blurred() and focussed() signals.
- Chart::WAxis
- Added setAutoLimits() and autoLimits() methods to configure which limits
are to be determined based on the data, and which are explicitly set.
- Chart::WDataSeries
- Added the setHidden() and hidden() methods to enable or disable
a data series. Added setBarWidth() and barWidth() methods to set the
width of a bar (useful mostly for scatter plots). Added
setMarkerSize() and markerSize() methos.
- Chart::WCartesianChart
- Use MarkerPenColorRole and MarkerBrushColorRole to override
colors for makers on a per data point basis. Added mapFromDevice()
and mapToDevice() methods for mapping device coordinates to chart
coordinates and vice-versa
C) API Changes:
- WSlider
- Not really an API change, but the vertical slider is now showing
the maximum value at its top side, not its bottom side.
- Chart::WAxis
- The minimum() and maximum() methods will now return the calculated
minimum and maximum value when they are to be automatically calculated based
on the data, configured using setAutoLimits()
D) Build changes:
- XML_FEATURES
- A new configuration option, XML_FEATURES, was added which allows the library to be built without MiniXML (and disabling fatures that require Mini-XML support). This configuration option is likely to be removed again in future versions.
- Documentation
- A
doc
directive was added, which uses doxygen and asciidoc tools
to generate the reference documentation and tutorial.
- Tests
- Automated tests were added for non-interactive functionality,
and are built by default.
Release 3.0.0 (November 3, 2009)
This release contains mostly bug fixes, build improvements and
documentation improvements compared to the latest pre-release
(2.99.5).
Most build improvements are related to finding the boost
libraries. Previously, Wt used a custom script, since CMake versions
< 2.6 did not provide a good enough script for finding
boost. Starting with this release, when using CMake 2.6 or later, Wt
will use the script that comes with CMake. You can still fall back to
the script that comes with Wt, which is still used for older versions
of CMake, by defining one of the BOOST_COMPILER or BOOST_VERSION
variables.
A) New classes:
No new classes
B) Main new features in existing classes:
- WDialog
- It is now possible to have multiple modal dialogs, and nested
recursive event loops.
-
WWidget
- The setDisabled() method moved up
from WFormWidget to WWidget.
-
JSlot
- The exec() method now passes object and event to the
JavaScript event handler.
C) API Changes:
- WResource
- The handling of changes to the resource has been sanitized. A
new method, setChanged() was added which must be called
to notify users of the resource that the resource was changed. In
addition to the existing generateUrl() which generates
a new URL, a method was added which merely returns the existing
URL: url(). With these improvements, a resource can
effectively be shared by many view widgets and updated with the
minimum of bandwidth usage.
Release 2.99.5 (September 1, 2009)
This release contains mostly bug fixes. The previous release (2.99.4)
contains some critical bugs that cause mayhem on IE, and a regression
with server push.
Release 2.99.4 (August 27, 2009)
!! This release contains bugs that render it unusable on IE !!
This release contains mostly bug fixes and back-end improvements. The
most exciting new feature is the addition of a new bootstrap method,
which implements progressive enhancements (starting with a plain HTML
page, and then upgrading it to an AJAX page if the browser has
support), see
also the
documentation.
A) New classes:
- WTableView
- This is a simple MVC View class that renders tabular data
in the most straight forward way using an HTML table element
B) Main new features in existing classes:
- Ext::ToolBar
- Added insert() methods.
- WApplication
- Added an enableAjax() method which notifies the application that
a session is being enhanced with AJAX capabilities when using the
progressive bootstrap method.
- WWidget
- Added an enableAjax() method which enhanced the widget with AJAX
capabilities when using the progressive bootstrap method.
- WCssDecorationStyle
- Add support for custom cursors.
- WServer
- For FastCGI deployments, the proxy process which directs FastCGI
requests to the correct session process is now also
multi-threaded.
C) API Changes:
- The WApplication::notify() behavior changed.
- Previously during a request, this method was called multiple
times during event propagation and rendering of the
application. Now, the method is called exactly once for each
request. In this way, it becomes a useful entry point to also manage
resource usage during (and inbetween) requests.
Release 2.99.3 (July 24, 2009)
This release contains mostly bug fixes and small feature
improvements. The most notable change that might affect existing
applications is a simplified internal path API behavior.
A) New classes:
- WAbstractItemDelegate
and WItemDelegate
- WAbstractItemDelegate is a helper class used
by WTreeView (and in the future perhaps other view
classes) to render contents. The standard
implementation, WItemDelegate maintains the default
implementation that was previously integrated
in WTreeView. The delegate will be responsible for
editing features in WTreeView in the future, and in
fact, you can already implement a custom item delegate that does
editing if you cannot wait for it!
- Test/WTestEnvironment
- WTestEnvironment is an environment class which is useful for
(unit) test-cases: it allows the instantiation of a
WApplication so that you may include widgets in unit tests.
B) Main new features in existing classes:
C) API Changes:
- change of WApplication::internalPathChanged() semantics.
- The old behavior was that a single internal path change caused
by the user (e.g. by moving forward/backword through his browser
history) would cause repetitive invocations of internalPathChanged()
with different arguments. The underlying idea was that this would
make it easier to have the handling of internal path changes
distributed over different objects. It caused however more problems
than it solved. The new behavior is now that it is invoked exactly
one time, and the argument is simply the new internal path.
Release 2.99.2 (May 29, 2009)
This release contains mostly build improvements, bug fixes, and API cleanups.
A) New classes:
- Http/Client
- Client is a utility class to bootstrap a new Wt
application.
B) Main new features in existing classes:
- Ext::FormField
- Add setFocus() method.
- Ext::ToolBar
- Added an addStretch() method (contributed by David Galicia).
- Http::Response
- Added a continuation() method.
- WCheckBox
- Add support for tri-state checkboxes. These are also supported
by item models and WTreeView.
- WDialog
- Support for non-modal dialogs and interactive moving.
- WFormWidget
- New methods setReadOnly() and isReadOnly().
- WGridLayout
- Support a row stretch value of -1, which is like 0 but will still
manage the height of cells (allowing their contents to fill the entire
cell).
- WPaintDevice
- Support update rendering (not erasing the current canvas) using
paint flags.
C) API Changes:
- WFileUpload::isUploaded() was deprecated
- The name was not covering its actual behavior: instead of
checking whether a file has been uploaded, it returns whether true
when a call to upload() is not needed. You should replace any call
to isUploaded() with the new method
!canUpload() (note the inversion!.
Release 2.99.1 (Mar 20, 2009)
This release contains only build improvements, bug fixes, and API cleanups.
Release 2.99.0 (Mar 4, 2009)
This release is a preview for Wt 3.0.0. Many things have changed both
in the internals and the API. This is the first release that provides
several API changes which are not backward compatible (some of which
were post-poned until now).
Please read the following notes carefully, especially sections C) and
D), to understand what changes to expect and how to adapt existing
applications.
Support for the C++ boost library < 1.35 has been dropped: Wt now
requires at least boost >= 1.35.0.
A) New classes:
- WFlags
- WFlags is a utility class that provides a type-safe ORing of
enum flags. It is used everywhere in the Wt API where previously an
int was used to allow enums to be ORed together.
- WGoogleMap
- This is a widget, contributed by Richard Ulrich, that displays a
Google map.
- Http::Request, Http::Response, Http::ResponseContinuation and Http::UploadedFile
- These are utility classes which model an HTTP request and
response and that are used in the new WResource API.
B) Main new features in existing classes:
- WApplication::enableUpdates()
- Server-initiated updates (aka "server push") has been
reimplemented and now works reliably in all situations, including in
the presence of intermediate proxies. The dependency on the 3rd
party JS orbited library has been removed and replaced with a simple
XHR-based solution.
- WButtonGroup
- Various methods were added: id's may be associated with a specific
radio buttons, which may be used to identify a particular button.
- WDatePicker
- Is now easier to use because of a sensible default constructor
that also creates the line edit using a WDateValidator,
and creates the icon which is associated with the popup.
- WFileResource
- Uses the continuation support in the new WResource API
to transmit the file in chunks.
- WLength
- WLength::Auto was added, is a synonym for WLength()
- WSuggestionPopup
- Is now also an MVC View widget, reading its data from a
WAbstractItemModel
- WTable
- New method
setHeaderCount() to specify the number of first rows or columns that
should be rendered as an HTML table header
(<th>).
- WWidget
New virtual method rerender() which allows a
widget to prepare itself before rendering (and defer internal
changes until that time). A widget may ask to be rerendered using
askRerender()
Widget no longer
inherits from WResource, but instead inherits directly from
WObject. It was simply a bad idea, and not useful for
anything.
C) Changes that break existing applications:
- 1) Signals are no longer public members
Instead, they are now accessor member functions:
e.g. WInteractWidget::clicked has been renamed to
WInteractWidget::clicked(). This has as major benefit
that signals can be created on-demand, which leads to drastically
lower memory usage and significant speedups especially on embedded
systems.
The change requires that everywhere in your code
where you access a signal, you will need to change to add
parentheses. For consistency, you may also want to
use the same convention for your own widget classes that define
signals.
- 2) WResource
The API has been redesigned and greatly simplified. If you are
implementing your own resources, then you will need to redesign your
implementation. The new API is simpler (requires only one virtual
method to be implemented) and more powerful, providing support for
continuations to serve large resources without blocking a
thread or requiring large memory usage.
In addition, resources have better thread-safety: they are now by
default reentrant (requests for a single resource may be handled
concurrently) and they are protected from concurrently being
destroyed by the main event loop.
- 3) WValidator
The signature for the virtual validate() method was
changed: parameter pos which was ignored anyway has
been removed.
- 4) WEnvironment
The methods getArgument() and
arguments() were renamed to respectively
getParameter() and getParameterMap(). The
signature for getParameter() is also different as it
returns a pointer to a string, which is 0 when the parameter is not
defined, instead of the olde behaviour of throwing an
exception. There is a new method that allows to read all values for
a parameter, getParameterValues()
- 5) WModelIndex
The 20-byte SHA1 hash based internal pointer has been removed
again as the object increase and overhead could not be justified.
D) Deprecated API that was removed:
These are API calls that were deprecated in earlier releases, and have now
been completely removed from the library:
- WApplication::applicationName()
- Use
WApplication::internalPath() instead.
- WApplication::setState()
- Use WApplication::setInternalPath()
instead.
- WApplication::state()
- Use
WApplication::internalPath() instead.
- WApplication::stateChanged
- Use WApplication::internalPathChanged()
instead.
- WRegExpValidator::WRegExpValidator(const boost::regex&)
- Use the WRegExpValidator(const
WString&) constructor instead.
- WPainterPath::drawArc(..., width, height, ...)
- An elliptical arc segment could not be support on all devices.
- WTable::numRows()
- Use WTable::rowCount().
- WTable::numColumns()
- Use WTable::columnCount()
instead.
- WText::setFormatting() and
WText::formatting()
- Use WText::setTextFormat() and
WText::textFormat() instead.
Release 2.2.3 (Jan 26, 2009)
This release is a maintenance release, with mostly bug fixes and
feature improvements.
A) Main new features in existing classes:
- WAbstractItemModel:
- const char * data in boost::any is now
also supported.
- WAbstractProxyModel:
- Implemented toRawIndex()
and fromRawIndex() so that indexes can be recovered
when the model's layout is changed, if the underlying model
provides implementations for toRawIndex()
and fromRawIndex().
- WComboBox:
- Also supports StyleClassRole data role for items
- WDialog:
- New method setTitleBarEnabled() to disable the default
title bar.
- WMenu:
- New method removeItem(), only works when rendered as a
list.
- WTabWidget:
- New method removeTab().
- WTreeView:
- New method setColumn1Fixed() to fix the first
column while scrolling horizontally through the other columns.
- New method setColumnFormat() to control formatting of
data.
- New method setColumnBorder() to set the
internal column border color.
- New method setColumnResizeEnabled() to disable resize
handles.
- The view now also reacts correctly to insertion and
removal of model columns.
B) New examples
-
gitmodel:
- An example that demonstrates how to implement a custom abstract
item model.
- treeview-dragdrop:
- An example that demonstrates drag and drop support in WTreeView.
C) Changes that break backward compatibility
- WApplication:
- useStyleSheet() only supports a subset of IE condition
strings, since the string is now parsed by Wt rather than by IE (when
dynamically loading stylesheets, the comment-syntax does not work
reliably).
Release 2.2.2 (Dec 1, 2008)
As of now, we will also be listing noteworthy new API features,
even if they are no concern for backwards compatibility.
A) New classes:
- WPopupMenu,
WPopupMenuItem:
- A popup menu, which you would typically use to present a
context menu.
- WAbstractProxyModel,
WSortFilterProxyModel:
- Proxy models, which present data from a source model in a
different way.
- WLoadingIndicator, WDefaultLoadingIndicator,
WOverlayLoadingIndicator:
- Customizable loading indicators.
B) Main new features in existing classes:
- WTreeView, WAbstractItemModel:
- The WAbstractItemModel interface was extended to allow handling
of drag & drop events, and WTreeView now is able to start
dragging and handle dropping of item selections and other data.
- JSignal:
- You can now pass the original (keyboard/mouse) JavaScript event
as a parameter to custom signals.
- WTreeView:
- access mouse event in itemClicked, doubleClicked and
mouseWentDown signals.
- WServer:
- Support for widget-set mode, allowing a Wt application to be
embedded in an existing web page/application.
C) Changes that break backward compatibility
This release does not contain changes that break existing
applications.
Release 2.2.1 (Nov 3, 2008)
This release is as usually a mix of bug fixes, improvements and new
features.
We have made a significant change to the MVC system, which will
break existing program code in case you have implemented your own
models (i.e. deriving from WAbstractItemModel) or views
widgets (i.e. components that listen to model changes).
The WAbstractItemModel interface was changed to support
hierarchical models. This means that most methods will now take an
extra parameter that specifies the parent WModelIndex,
and also all signals have now this extra parameter. Because the
parameter has a default value of WModelIndex() which corresponds to
the top level parent, the API is largely backwards compatible when
merely using the model. It is only those classes that reimplement the
interface, or listen to signal events, that are affected.
The immediate benefit of the new WAbstracItemModel
interface is that it allows us to implement View widgets like the new
WTreeView widget.
Release 2.2.0 (Sept 12, 2008)
This release has a rather substantial rewrite (and simplification)
of Wt's bootstrapping process. In the past, Wt used a frameset trick
to be able to load the AJAX-based skeleton when JavaScript was
available. Instead, now, the entire AJAX-based stuff is loaded
directly into the bootstrap page. A benefit of the new approach is
that we avoid iframe tricks, which have been deprecated from strict
HTML and XHTML. But, it was in fact motivated in the first place to
support all major browsers for a new internal path API. This new API
allows to fully support URL changes and bookmarks in a unified way
(i.e. it works equally when the browser supports AJAX, no JavaScript,
or is a bot such as google bot).
As a consequence, this release contains the following changes that
may break your application:
- WMenu::enableBrowserHistory() and WMenu::browserHistoryId() have been removed, use the new methods WMenu::setInternalPathEnabled() and WMenu::setInternalBasePath()
- WMenuItem has been reorganized, and if you have
specialized WMenuItem you will need to adapt your reimplementation
to the new virtual interface. In the new interface, you need to
reimplement WMenuItem::createItemWidget() and
WMenuItem::updateItemWidget() allowing you to react to
item changes (internal path or text). The default implementation now
always uses a WAnchor.
- WApplication::setState(), WApplication::state() and WApplication::stateChanged have been deprecated. It is strongly advised that you use the new internal path API instead. This does require you to treat different parts of the state as a file hierarchy. See the WApplication::setInternalPath() documentation.
The following methods have been deprecated (but are still supported):
- WTable::numRows() has been renamed
to WTable::rowCount().
- WTable::numColumns() has been renamed
to WTable::columnCount().
Release 2.1.5 (July 25, 2008)
Wt now installs its include files in a Wt/ subdirectory. You may
want to change your build files to pick up this new include directory,
or, change your code to scope the include files to look like
#include<Wt/WLineEdit> instead of #include<WLineEdit>
This release contains the following changes that may break your
application:
- WText will validate XHTML text when it is set to the
widget. The old behaviour was to validate only before
rendering. The change was needed to be able to react to XML parse
errors. As a consequence if you are creating a WText with text that
is not valid XML, followed by a
call setFormatting(WText::PlainFormatting), you should
change this now to use the new WText constructor which
takes the TextFormat as a new argument: new WText(text,
Wt::PlainText, parentWidget)
- WContainerWidget::setLayout(WLayout *layout, bool fitWidth, bool
fitHeight) has been replaced with the more generic
WContainerWidget::setLayout(WLayout *layout, int
alignment).
The following methods and enumerations have been deprecated (but are
still supported):
- enum WText::Formatting has been renamed
to Wt::TextFormat. The old values map as follows on new
values:
- WText::XHTMLFormatting becomes Wt::XHTMLText;
- WText::XHTMLUnsafeFormatting becomes Wt::XHTMLUnsafeText
- WText::PlainFormatting becomes Wt::PlainText
- WText::setFormatting() has been renamed
to WText::setTextFormat() and
WText::formatting() has been renamed
to WText::textFormat().
Release 2.1.4 (July 4, 2008)
The following has changed for building Wt:
- The CMake variable CONFIGURATION (which defaulted to
/etc/wt/wt_config.xml) is no longer used, but instead there is now a
CONFIGDIR (/etc/wt/) which is used to store configuration
files.
The following has changed in the wt_config.xml file:
- The <valgrind-path> setting for the FCGI connector may now
be a command-line including arguments
This release should not contain changes that may break your
application.
Release 2.1.3 (May 20, 2008)
This release should not contain changes that may break your
application.
Release 2.1.2 (April 14, 2008)
The following changes may break your application build:
- WTreeNode::expanded() has been renamed
to WTreeNode::isExpanded().
Release 2.1.1 (April 10, 2008)
This release should not break any of your applications, but we did
deprecate some methods and enumeration types. You are advised to
migrate to the replacements methods since we will discontinue support
for the older ones in the future.
The following methods and enumerations have been deprecated:
- enum SelectionUnit has been renamed
to SelectionBehavior. The old values map as follows on new
values: CellSelection becomes SelectItems;
RowSelection becomes SelectRows.
- WWidget::setOffset(int sides, WLength) is deprecated,
and the new method is WWidget::setOffsets(WLength, int
sides): the argument order has been switched to be consistent
with the method signature of setMargin()
and setPadding().
- WResource::suggestFilename() has been renamed to
WResource::suggestFileName().
The following changes affect run-time behaviour:
- WTreeNode now supports a policy for when to show a child count
indication. The old behaviour was to always show the child count.
Now, by default this option is disabled. Use
WTreeNode::setChildCountPolicy(Enabled) to get the old
behaviour back, if you wish.
Release 2.1.0
The library dependencies have changed slightly.
To build Wt 2.1.0, you need:
- CMake 2.4 or later
- boost 1.34.1 (boost 1.33.1 might should still work, but is
not recommended)
- asio 0.3.9: either the boost or non-boost version (only
for the http connector)
- optionally, openssl for HTTPS support (only for the http
connector)
- optionally, libz for gzip compression support (only for
the http connector)
- fcgi library, including C++ bindings (libfcgi++)(only for the
fcgi connector)
Furthermore, the Wt::Ext library has been upgraded and now wraps
around the extjs 2.x library, instead of extjs 1.x.
Some API changes may need a porting effort:
- Ext::ProgressDialog: doesn't show by default, you
need to call show() to show the dialog.
- Ext::ContentPanel, Ext::BorderLayout have
been removed. They have been replaced with a stand-alone layout
system, that may manage contents in
an Ext::Container. The layout system provides
WBorderLayout and several other layout managers.
- WSignalMapper has been expanded to allow mapping of
signals with an extra argument, which is passed to the mapped
signal. Because of this, the signature of the class has been
expanded with an extra template argument. If you have forward
declarations to WSignalMapper, you will need to modify
these too (or simply include WSignalMapper).
- WAnchor: no longer uses a WLabel internally,
and the label-related methods have been removed.
Release 2.0.5
- WDialog (and WMessageBox) usage changed, and
is now more like Qt. When you are not
using WDialog::exec() or WMessageBox::show(...),
then you must explictly show() the dialog to show it. You
can now also hide() the dialog if you want.
-
Moved several enums from within classes to the Wt namespace. This is
likely to break your code at compile time when you are using one. The
fix is to remove the class scope from the enum type or value.
- WScrollArea::Orientation -> Wt::Orientation
- WMenu::Orientation -> Wt::Orientation
- WMessageBox::StandardButton -> Wt::StandardButton
- WMessageBox::Icon -> Wt::Icon
Release 2.0.4
Important: 2.0.4a contains a fix for a bug introduced in 2.0.4 that
reset the deploy-path in wthttpd.
This release adds a few new features:
- WComboBox (and WSelectionBox) now use
a WAbstractItemModel in a more flexible model/view
system.
- Stylesheets may be browser-conditional (by Patrick Fischer)
- wthttpd may serve custom error pages (by Patrick Fischer)
- WResource can now access HTTP GET or POST query
arguments. This will break your code (at compile time) if you
have implemented your own WResource, since the signature of the
streamResourceData() method has been changed to pass
the arguments map as a second parameter.
Release 2.0.1
This release fixes some build-related problems, as well as smaller
bugs. The main improvement in this release is related to use of Wt
in resource-constrained embedded systems.
The most visible change is that the dependency on the Xerces C++ XML
library was dropped in favour of the much smaller Mini-XML
library. The draw-back is a reduction of supported character
encodings to only UTF8 and UTF16, next to the default locale character
encoding (which is typically an 8-bit flavour).
When using the built-in httpd, you can now disable support for SSL
at compile time, freeing a number of SSL-related dependencies.
In the API, more comparison operators (== and !=) were added to
WString, and a WViewWidget was added for simple MVC widgets (with
the main purpose to reduce session-state at the server).
Release 2.0.0
This release contains numerous changes which are likely to cause some
porting effort for Wt 1.1.x applications to work properly.
If you are upgrading from a 1.99.x release, you will notice that
some of these notes have actually evolved, especially with respect to
WString and unicode support.
Here is a list of changes with respect to Wt 1.1.x that are likely
to require your attention, and some tips on how to do the porting.
1) Namespace Wt
All Wt classes are now inside the namespace Wt.
To handle this change, you will need to:
- Wrap forward declarations to Wt widgets in header files inside a
Wt namespace, or #include <WFwdDeclarations>
- and scope all Wt classes with Wt::,
- or import the Wt namespace: using namespace Wt;
2) WString
Previously, most widgets offered double methods that either used a
std::string for literal text, or a
WMessage for localized text.
In the new release, widgets use Wt::WString for both
literal and localized text. WString offers unicode support for both
literal as well as localized text. To create a literal string,
simply assign or construct a Wt::WString from that string. The
strings supported or both narrow and wide C and C++ strings. UTF8
encoded narrow strings may also be converted. To create a localized
string, use one of the static methods WString::tr(const
std::string key) and WWidget::tr(const std::string
key).
To help with legacy code, WMessage is now a typedef for WString, but
is deprecated and should not be used in new code. Unfortunately, the
constructors WMessage(const char *text) and
WMessage(const std::string text), changed meaning!
While previously they took a key to construct a localized message,
they now take a literal text (the exact opposite!), since they are
in fact plain WString() constructors. As a consequence your application
will display key values instead of resolving those values (but will
not break entirely).
The new approach offers the benefit of only requiring one method
signature for both literal and localizable text. This not only
simplifies our work, but more importantly by using
WString for displayed text in the API of your own
widgets, localization (including the automatic language switching)
comes automatically and is decided on by the user of your widget.
Fortunately, there is a straightforward trick to handle most consequences
of this change:
- Replace WMessage(...) with tr(...),
- add .value() when using the result of functions such
as WText::text(),
- change your own classes to use WString
wherever they expect some text that will be displayed, instead of
std::string or WMessage.
3) Wide string API
Since Wt 2.0.0, the API for Wt has been changed to use WString
instead of C++ narrow strings. WString supports both narrow and wide
strings, and provides conversion between both. It does not provide
string operations, however, and instead acts as a string
container. You should convert to a C++ string type to perform
operations. You should also not use WString outside of the user
interface part of your application.
4) No more wmain()
Previously, the Wt library implemented the main(int argc, char
**argv) function, and called a wmain() function
which created the WApplication instance.
Wt 2.0.0 allows multiple applications to run within a single process.
Therefore, the WApplication::exec() approach was no longer
feasible. The new approach requires that:
- your main function should look like this:
int main(int argc, char **argv)
{
return Wt::WRun(argc, argv, &createApplication);
}
- where createApplication is a function of the following
signature:
Wt::WApplication *createApplication(const Wt::WEnvironment& env)
{
// return a new application object.
}
5) Configuration in /etc/wt/wt_config.xml
Wt 2.0.0 uses a configuration file for a number of settings that
could previously be configured at build time of the library, or
in the API. The latter functions are:
- WApplication::setMaximumRquestSize()
- WApplication::setIdleTimeout()
6) Removed obsolete classes
Wt 2.0.0 removed a number of classes that were still in the widget
tree, but have been obsoleted by more flexible classes:
- WAbstractTab, WButtonTab, and WTabWidget are obsoleted by the more flexible WMenu.
7) Deprecate boost::regex from WRegExpValidator API
The constructor and methods that takes a boost::regex object in
the WRegExpValidator API have been deprecated, to remove the dependency
on boost from the public API. You should consider the std::string based
constructor and method instead.
8) WObject::emit() has been removed.
Since Wt 1.99.1, we have removed WObject::emit() function. Instead,
you may simply call the signal with its arguments, or use the
explicit emit method (recommended).
To adapt your code, you should:
- Replace all emit(MySignal(...)) with MySignal(...) or MySignal.emit(...)
9) WResource::streamResourceData() signature has changed.
Since Wt 2.0.0, WResource::streamResourceData() returns a boolean value
which indicates if all data has been streamed. If you have reimplemented
WResource for your applications, you must update the signature and return
true.
The change is relevant only within the new server-push support that is
now in Wt 2.0.0. This allows you to continuously append to the content
of a resource.
10) Rename of WJavascriptSlot to JSlot.
Release 1.1.7
This release contains lots of additions and improvements, but should
be completely backwards-compatible.
Release 1.1.6
There is one change which will impact the behaviour of current applications:
Currently, on exit, by default the last widget updates are shown. So, no
more good-bye message. This changes slightly when one needs to redirect()
to a new location: not when WApplication::exec() returns, but during the
same event handling as when calling WApplication::quit().
Release 1.1.5
Nothing special...
Release 1.1.4
Changes to impact everybody, since the previous release:
-
The dependency for libxml++ (and its large number of dependencies) has
been dropped, and replaced by Xerces-C++ (which has no further dependencies).
-
Wt programs need to link against libwtfcgi.so, instead of libwt.so. In the
future Wt will also support different web-connector systems besides
FastCGI.
-
The signatures of wmain() and WApplication constructor have changed:
new signatures are:
- int wmain(const WEnvironment& env)
- WApplication::WApplication(const WEnvironment& env)
Other changes:
- Support for unicode is implemented, but perhaps needs more testing
by non-Western people ? Only UTF-8 is supported currently.
- Addition of a WTimer class -- see mission example.
- Many bug fixes which should make Wt more robust against illegal CGI
requests (which are ignored), and now Wt should exit cleanly in more
(all?) circumstances.
- Addition of feed-back for pending AJAX requests (does not work yet on
IE).
- Support for style sheets is improved: now inline decoration styles
will override style sheet styles. See hangman or treelist examples.
- The browser can be redirected to a new page. This is useful when the
application is terminated -- or to change during the application from
HTTP to HTTPS and back.
- WValidationStatus API has changed -- less complicated now.