Skip to content

Commit 60f1427

Browse files
author
Koen Deforche
committed
see Changelog
1 parent 518584f commit 60f1427

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+873
-334
lines changed

CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ IF(WIN32)
5454
SET(GD_DIR ${USERLIB_ROOT} CACHE PATH "Search path for libgd")
5555
OPTION(BOOST_DYNAMIC "Link to boost DLLs (OFF means static link)" OFF)
5656
OPTION(MXML_SUPPLIED "Force use of supplied mxml over installed mxml." ON)
57+
OPTION(DEBUG "Support for debugging, must be enabled also in wt_config.xml" OFF)
5758

5859
ELSE(WIN32)
5960

@@ -69,7 +70,7 @@ ELSE(WIN32)
6970
SET(BOOST_VERSION "1_35" CACHE STRING "Boost libraries version signature")
7071
SET(GD_DIR "/usr/lib" CACHE PATH "Search path for libgd2")
7172
OPTION(MXML_SUPPLIED "Force use of supplied mxml over installed mxml." ON)
72-
73+
OPTION(DEBUG "Support for debugging, must be enabled also in wt_config.xml" OFF)
7374
ENDIF(WIN32)
7475

7576
MARK_AS_ADVANCED( CONFIGDIR )
@@ -109,6 +110,12 @@ IF(NOT CMAKE_BUILD_TYPE)
109110
FORCE)
110111
ENDIF(NOT CMAKE_BUILD_TYPE)
111112

113+
IF(DEBUG)
114+
SET(WT_DEBUG_ENABLED 1)
115+
ELSE(DEBUG)
116+
SET(WT_DEBUG_ENABLED 0)
117+
ENDIF(DEBUG)
118+
112119
# Compile time constants & make sure our build finds it
113120
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Wt)
114121
SET(WCONFIG_H_PATH ${CMAKE_CURRENT_BINARY_DIR}/Wt/WConfig.h)
@@ -141,4 +148,4 @@ INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/resources DESTINATION
141148

142149
IF(NOT EXISTS ${CONFIGDIR}/wt_config.xml)
143150
INSTALL(FILES ${PROJECT_SOURCE_DIR}/wt_config.xml DESTINATION ${CONFIGDIR})
144-
ENDIF (NOT EXISTS ${CONFIGDIR}/wt_config.xml)
151+
ENDIF (NOT EXISTS ${CONFIGDIR}/wt_config.xml)

Changelog

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
17-07-2009:
2+
* WServer, WGlobal: move WServer::Application and WServer::WidgetSet to
3+
global enum
4+
5+
* WAbstractToggleButton.C: put label inside a <span> so that it works
6+
as expected when used within a layout manager
7+
8+
* Test/WTestEnvironment: test environment, for instantiating
9+
WApplication instances usable for (unit) tests
10+
11+
06-07-2009:
12+
* WGridLayout, WBoxLayout, WTabWidget: better documentation that
13+
discusses how to set contents with 100% height.
14+
115
29-06-2009:
216
* JSlot: fix exec() call as suggested by Adrian Sutherland
317

Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ INCLUDE_FILE_PATTERNS =
11371137
# undefined via #undef or recursively expanded use the := operator
11381138
# instead of the = operator.
11391139

1140-
PREDEFINED = DOXYGEN_ONLY WT_USTRING=WString WT_BOSTREAM=std::ostream WT_ARRAY=
1140+
PREDEFINED = DOXYGEN_ONLY WT_USTRING=WString WT_LOCALE=std::string WT_BOSTREAM=std::ostream WT_ARRAY=
11411141

11421142
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
11431143
# this tag can be used to specify a list of macro names that should be expanded.

WConfig.h.in

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,15 @@
2424
#cmakedefine WTHTTP_STATIC
2525
#cmakedefine WT_EXT_STATIC
2626

27+
#if ${WT_DEBUG_ENABLED}
28+
#ifndef WT_TARGET_JAVA
29+
#define WT_DEBUG(statement) do { if (Wt::WApplication::instance()->debug()) statement; } while(0)
30+
#else
31+
#define WT_DEBUG(statement)
32+
#endif
33+
#else
34+
#define WT_DEBUG(statement)
35+
#endif
36+
2737
#endif
2838

examples/extkitchen/ExtKitchenApplication.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ WWidget *ExtKitchenApplication::createExampleTree()
109109
rootNode->expand();
110110
rootNode->setLoadPolicy(WTreeNode::NextLevelLoading);
111111

112-
createExampleNode("Menu & ToolBar", rootNode,
112+
createExampleNode("Menu and ToolBar", rootNode,
113113
&ExtKitchenApplication::menuAndToolBarExample);
114114
createExampleNode("Form widgets", rootNode,
115115
&ExtKitchenApplication::formWidgetsExample);

examples/hangman/HangmanDb.C

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ bool HangmanDb::validLogin(const std::wstring &user, const std::wstring &pass)
5555
q << "select user,pass from users where "
5656
<< "user='" << Wt::toUTF8(user)
5757
<< "' and pass=MD5('" << Wt::toUTF8(pass) << "')";
58-
Result res = q.store();
58+
StoreQueryResult res = q.store();
5959
return res.size() > 0;
6060
} catch(Exception &e) {
6161
std::cerr << "Database exception!\n";
@@ -72,7 +72,7 @@ void HangmanDb::addToScore(const std::wstring &user, int delta)
7272
q << "update users set score=(score+" << delta << "), "
7373
<< "numgames=(numgames+1), lastseen=now() "
7474
<< "where user='" << Wt::toUTF8(user) << "'";
75-
Result res = q.store();
75+
StoreQueryResult res = q.store();
7676
} catch(Exception &e) {
7777
std::cerr << "Database exception!\n";
7878
std::cerr << e.what() << std::endl;
@@ -88,7 +88,7 @@ std::vector<HangmanDb::Score> HangmanDb::getHighScores(int top)
8888
q << "select user, numgames, score, lastseen from users "
8989
<< "order by score desc "
9090
<< "limit " << top;
91-
Result res = q.store();
91+
StoreQueryResult res = q.store();
9292

9393
for(unsigned int i = 0; i < res.size(); ++i) {
9494
struct Score s;
@@ -113,7 +113,7 @@ HangmanDb::Score HangmanDb::getUserPosition(const std::wstring &user)
113113
Query q = con.query();
114114
q << "select user, numgames, score, lastseen from users "
115115
<< "order by score desc";
116-
Result res = q.store();
116+
StoreQueryResult res = q.store();
117117

118118
// There MUST be a better way to do this...
119119
for(unsigned int i = 0; i < res.size(); ++i) {

examples/hello-widgetset/hello.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,11 @@ int main(int argc, char **argv)
128128
// The following is the default entry point. It configures a
129129
// standalone Wt application at the deploy path configured in the
130130
// server configuration.
131-
server.addEntryPoint(WServer::Application, createApplication);
131+
server.addEntryPoint(Application, createApplication);
132132

133133
// The following adds an entry point for a widget set. A widget set
134134
// must be loaded as a JavaScript from an HTML page.
135-
server.addEntryPoint(WServer::WidgetSet, createWidgetSet, "hello.wtjs");
135+
server.addEntryPoint(WidgetSet, createWidgetSet, "/hello.wtjs");
136136

137137
// Start the server (in the background if there is threading support)
138138
// and wait for a shutdown signal (e.g. Ctrl C, SIGKILL)

examples/wt-homepage/main.C

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ int main(int argc, char **argv)
1414

1515
server.setServerConfiguration(argc, argv, WTHTTP_CONFIGURATION);
1616

17-
server.addEntryPoint(WServer::Application, createWtHomeApplication,
17+
server.addEntryPoint(Application, createWtHomeApplication,
1818
"", "/css/wt/favicon.ico");
1919

2020
if (server.start()) {
2121
WServer::waitForShutdown();
2222
server.stop();
2323
}
2424
}
25-

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ Wt/Http/Client.C
198198
Wt/Http/Request.C
199199
Wt/Http/Response.C
200200
Wt/Http/ResponseContinuation.C
201+
Wt/Test/WTestEnvironment.C
201202
web/CgiParser.C
202203
web/Configuration.C
203204
web/DomElement.C

src/Wt/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SUBDIRS(Ext Chart Http)
1+
SUBDIRS(Ext Chart Http Test)
22
INSTALL_FILES(/include/Wt "^W.*[^C~]$")
33
#INSTALL(
44
# FILES

0 commit comments

Comments
 (0)