Skip to content

Commit

Permalink
Several fixes and improvements:
Browse files Browse the repository at this point in the history
    Wt::Render: fixed matching of Selector containing 3 or more identical simple selectors

    Fix #2029: responsive navigation bar without animations, also provide a good
	solution for animations+layouts interference

    Fix #2084: missing dllimport/export for WAbstractProxyModel::BaseItem

    Build: Blacklist boost 1.54 on Windows (httpd data corruption), added C++11 build option

    Signals: Support signals2 as signals is being dropped in newer boost versions

    Wt::Dbo: add updateAuthToken() to update an existing auth token (keeping its expiration time)

    Implement #1914: Wt::Json::serialize() functions

    Wt::Render: account for margin, padding, borders for minimum width calculations

    Fix #2071: WStringStream: make compiler bwarf on unsupported types

    Fix #2078, #2079 internal path redirect in progressive bootstrap application

    Fix #1952: WCompositeWidget::setObjectName()

    Fix #1948 (patch from Pierluigi Vicinanza)

    Wt::Render: improve table rendering: support border-collapse collapse and honor set widths

    Fix #2002: WTabWidget::setTabEnabled() partially working

    Fix #2080: Timing issue with document.body being available in progressive bootstrap

    WString: resolve using WServer::localizedStrings if no WApplication context is available

    Implemented #1602: Wt::Mail::Message::setDate()

    Implemented #1390: Adding support for local date/time (WLocalDateTime)

    implemented #1179: interpret ItemIsSelectable for enabling/disabling options in
	combo-box/selection box

    Fix #2074: inOneSecond issue (Bruce Toll)

    Layouts: fix problem requiring to reapply whenever a parent widget changes size

    Fix #2039: segfault (vector subscript out of range) in WSortFilterProxyModel

    Fix #2018: Wt::Http::Client actually does not append port numbers to the "Host" header

    Fix #2016: Wt::Http::Client::parseUrl cannot parse URLs containing username and password

    Fix #2067 WDateEdit: on click event not received when setEmptyText is used

    Config: remove the xhtml mime-type option, viva HTML5
  • Loading branch information
Koen Deforche committed Aug 8, 2013
1 parent 2d4882f commit 993c38c
Show file tree
Hide file tree
Showing 119 changed files with 3,172 additions and 1,194 deletions.
48 changes: 48 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,33 @@ OPTION(ENABLE_QT4 "Build Qt4 interworking library (libwtwithqt" ON)
OPTION(WT_NO_STD_LOCALE "Build Wt to run on a system without std::locale support" OFF)
OPTION(WT_NO_STD_WSTRING "Build Wt to run on a system without std::wstring support" OFF)

# C++11 vs C++98
# Binary compatibility is not guaranteed. We give our users the choice on
# how to compile Wt
# We're not sure yet if you can safely link Wt compiled in 03 mode against
# an application compiled in 11 mode. Boost probably causes problems here
# (specially boost.signals2)
IF(NOT MSVC)
# For now, don't auto-detect
#IF(CMAKE_COMPILER_IS_GNUCXX)
# execute_process(COMMAND ${CMAKE_C_COMPILER} "-dumpversion"
# OUTPUT_VARIABLE GCC_VERSION)
# IF(${GCC_VERSION} VERSION_GREATER "4.5.99")
# SET(HAS_CXX11 ON)
# ENDIF(${GCC_VERSION} VERSION_GREATER "4.5.99")
#ENDIF(CMAKE_COMPILER_IS_GNUCXX)
SET(WT_CPP_11_MODE "" CACHE STRING "C++ mode to compile Wt in (leave empty for your compiler's default, or set to -std=c++11, -std=c++0x, ...)")
IF(WT_CPP_11_MODE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WT_CPP_11_MODE}")
SET(HAS_CXX11 ON)
ENDIF(WT_CPP_11_MODE)
ELSE(NOT MSVC)
# For once, msvs is easier than gcc/llvm
IF(MSVC_VERSION GREATER 1600)
SET(HAS_CXX11 ON)
ENDIF(MSVC_VERSION GREATER 1600)
ENDIF(NOT MSVC)

IF(APPLE)
OPTION(USE_BOOST_FRAMEWORK "Uses a Boost framework" OFF)
ENDIF(APPLE)
Expand Down Expand Up @@ -351,6 +378,27 @@ ELSE(BOOST_WT_MT_FOUND)
ADD_DEFINITIONS(-DBOOST_DISABLE_THREADS -DSQLITE_THREADSAFE=0)
ENDIF(BOOST_WT_MT_FOUND)

# decide on signals vs signals2
# boost 1.54 deprecated boost signals -> use signals2
IF (Boost_VERSION GREATER 105300)
MESSAGE(STATUS "Boost ${Boost_VERSION} > 1.53, WT_SIGNALS_IMPLEMENTATION = boost.signals2 recommended")
SET(DEFAULT_WT_SIGNALS_IMPLEMENTATION "boost.signals2")
ELSE (Boost_VERSION GREATER 105300)
SET(DEFAULT_WT_SIGNALS_IMPLEMENTATION "boost.signals")
MESSAGE(STATUS "Boost ${Boost_VERSION} < 1.54, WT_SIGNALS_IMPLEMENTATION = boost.signals recommended")
ENDIF (Boost_VERSION GREATER 105300)
SET(WT_SIGNALS_IMPLEMENTATION ${DEFAULT_WT_SIGNALS_IMPLEMENTATION} CACHE STRING "Select what implementation should be used for Wt signals")
SET_PROPERTY(CACHE WT_SIGNALS_IMPLEMENTATION PROPERTY STRINGS boost.signals boost.signals2)

IF ("${WT_SIGNALS_IMPLEMENTATION}" STREQUAL "boost.signals")
MESSAGE(STATUS "Selecting boost.signals")
SET(WT_USE_BOOST_SIGNALS ON)
SET(WT_USE_BOOST_SIGNALS2 OFF)
ELSEIF ("${WT_SIGNALS_IMPLEMENTATION}" STREQUAL "boost.signals2")
MESSAGE(STATUS "Selecting boost.signals2")
SET(WT_USE_BOOST_SIGNALS OFF)
SET(WT_USE_BOOST_SIGNALS2 ON)
ENDIF ("${WT_SIGNALS_IMPLEMENTATION}" STREQUAL "boost.signals")


FIND_PACKAGE(Doxygen)
Expand Down
2 changes: 0 additions & 2 deletions WConfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@
#cmakedefine WT_NO_STD_WSTRING
#cmakedefine WT_DEBUG_ENABLED

// Only one of the two below should be selected
#cmakedefine WT_USE_BOOST_SIGNALS
#cmakedefine WT_USE_BOOST_SIGNALS2
#define WT_USE_BOOST_SIGNALS

#endif

2 changes: 2 additions & 0 deletions cmake/WtFindFcgi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ FIND_PATH(FCGI_INCLUDE_DIR
FIND_LIBRARY(FCGI_LIB fcgi
${FCGI_PREFIX}/lib
/usr/lib
/usr/lib64
/usr/local/lib
)

FIND_LIBRARY(FCGIPP_LIB fcgi++
${FCGI_PREFIX}/lib
/usr/lib
/usr/lib64
/usr/local/lib
)

Expand Down
15 changes: 1 addition & 14 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,23 +174,10 @@ SUBDIRS(
wtwithqt
)

IF(MSVC_VERSION)
IF(MSVC_VERSION GREATER 1600)
SET(HAS_CXX11 ON)
ENDIF(MSVC_VERSION GREATER 1600)
ENDIF(MSVC_VERSION)
IF(CMAKE_COMPILER_IS_GNUCXX)
execute_process(COMMAND ${CMAKE_C_COMPILER} "-dumpversion"
OUTPUT_VARIABLE GCC_VERSION)
IF(${GCC_VERSION} VERSION_GREATER "4.5.99")
SET(HAS_CXX11 ON)
ENDIF(${GCC_VERSION} VERSION_GREATER "4.5.99")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)

IF(HAS_CXX11)
SUBDIRS(
widgetgallery
)
ELSE(HAS_CXX11)
MESSAGE("Not building widget gallery; a C++11 compiler is required (gcc > 4.6 or MSVS 2012)")
MESSAGE("*** Not building widget gallery; C++11 required (gcc > 4.6 + set WT_CPP_11_MODE=-std=c++0x or MSVS >= 2012)")
ENDIF(HAS_CXX11)
18 changes: 18 additions & 0 deletions examples/blog/model/BlogUserDatabase.C
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,24 @@ void BlogUserDatabase::addAuthToken(const Auth::User& user,
(dbo::ptr<Token>(new Token(token.hash(), token.expirationTime())));
}

int BlogUserDatabase::updateAuthToken(const Auth::User& user,
const std::string& hash,
const std::string& newHash)
{
WithUser find(*this, user);

for (Tokens::const_iterator i = user_->authTokens.begin();
i != user_->authTokens.end(); ++i) {
if ((*i)->value == hash) {
dbo::ptr<Token> p = *i;
p.modify()->value = newHash;
return std::max(Wt::WDateTime::currentDateTime().secsTo(p->expires), 0);
}
}

return 0;
}

void BlogUserDatabase::removeAuthToken(const Auth::User& user,
const std::string& hash)
{
Expand Down
3 changes: 3 additions & 0 deletions examples/blog/model/BlogUserDatabase.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ class BlogUserDatabase : public Wt::Auth::AbstractUserDatabase

virtual void addAuthToken(const Wt::Auth::User& user,
const Wt::Auth::Token& token);
virtual int updateAuthToken(const Wt::Auth::User& user,
const std::string& hash,
const std::string& newHash);
virtual void removeAuthToken(const Wt::Auth::User& user,
const std::string& hash);
virtual Wt::Auth::User findWithAuthToken(const std::string& hash) const;
Expand Down
4 changes: 0 additions & 4 deletions examples/widgetgallery/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ IF (HAVE_HARU)
INCLUDE_DIRECTORIES(${HARU_INCLUDE_DIRS})
ENDIF(HAVE_HARU)

IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)

#
# If you have Wt installed somehwere, you should use the
# installed Wt header files for your own Wt projects.
Expand Down
Loading

0 comments on commit 993c38c

Please sign in to comment.