Permalink
Browse files

Merge branch 'release-6.3.7'

  • Loading branch information...
2 parents 7067bf2 + 26863ed commit 406ec7d6900a806c16e42f9fd15f0d3f6111c18a @mike-lischke mike-lischke committed Jun 14, 2016
Showing 666 changed files with 56,055 additions and 44,059 deletions.
View
@@ -30,6 +30,10 @@ string(STRIP ${WB_VERSION} WB_VERSION)
# Look for our custom modules in cmake/Modules:
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/build/cmake/Modules/")
+if(ENABLE_COTIRE AND CMAKE_VERSION VERSION_GREATER "2.8.11")
+ include(cotire)
+ set_property(DIRECTORY PROPERTY COTIRE_UNITY_LINK_LIBRARIES_INIT "COPY_UNITY")
+endif()
find_package(PkgConfig REQUIRED)
find_package(X11)
@@ -74,7 +78,7 @@ endif ()
# We need to be able to detect python module versions and packages hence this function
-FIND_PROGRAM(PYTHON_EXEC "python")
+FIND_PROGRAM(PYTHON_EXEC "python2")
include(FindPackageHandleStandardArgs)
function(find_python_module module minver)
string(TOUPPER ${module} module_upper)
@@ -105,6 +109,9 @@ find_package(MySQL 5.6.0 REQUIRED)
if (UNIX)
set(MYSQL_DEFINITIONS "-DBIG_JOINS=1" "-fno-strict-aliasing")
endif()
+set(PRECOMPILED_HEADERS_EXCLUDE_PATHS "/usr/include/gdal;/usr/include/arpa;${CMAKE_SOURCE_DIR};${PROJECT_SOURCE_DIR}/ext/antlr-runtime;${PROJECT_BINARY_DIR};${MySQL_INCLUDE_DIRS}")
+
+
find_package(LibXml2 REQUIRED)
@@ -266,6 +273,7 @@ endif ()
add_definitions(-D__STDC_FORMAT_MACROS)
set(BUILD_SHARED_LIBS ON) # By default all libs will be built as shared libs
+SET(GCOV OFF CACHE BOOL "Add gcov flags")
# Add some common compiler flags. TODO: Shouldn't this be done checking if whatever compiler
# we use supports each flag to allow for non-gcc compilers in Linux (as above)?
@@ -276,6 +284,11 @@ if (CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${MY_CXXFLAGS}")
endif()
+if(GCOV)
+ set(MY_CXXFLAGS "${MY_CXXFLAGS} -fprofile-arcs -ftest-coverage")
+endif()
+
+
#-----------------------------------------------------------------------
# Define some useful variables and options
View
@@ -72,23 +72,25 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>6.3.6</string>
+ <string>6.3.7</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.developer-tools</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>10.9.0</string>
+ <key>NSAppTransportSecurity</key>
+ <dict>
+ <key>NSAllowsArbitraryLoads</key>
+ <true/>
+ </dict>
<key>NSHumanReadableCopyright</key>
- <string>Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.</string>
+ <string>Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
- <key>NSAppTransportSecurity</key>
- <dict>
- <key>NSAllowsArbitraryLoads</key>
- <true/>
- </dict>
</dict>
</plist>
View
Oops, something went wrong.
Oops, something went wrong.
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
- LastUpgradeVersion = "0710"
+ LastUpgradeVersion = "0730"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
- LastUpgradeVersion = "0710"
+ LastUpgradeVersion = "0730"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
View
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundleIdentifier</key>
- <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundlePackageType</key>
- <string>BNDL</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>1.0</string>
-</dict>
-</plist>
@@ -115,4 +115,10 @@ set_target_properties(wbprivate
PROPERTIES VERSION ${WB_VERSION}
SOVERSION ${WB_VERSION})
+if(COMMAND cotire)
+ set_target_properties(wbprivate PROPERTIES
+ COTIRE_PREFIX_HEADER_IGNORE_PATH "${PRECOMPILED_HEADERS_EXCLUDE_PATHS}")
+
+ cotire(wbprivate)
+endif()
install(TARGETS wbprivate DESTINATION ${WB_INSTALL_LIB_DIR})
@@ -56,6 +56,10 @@ class wb::SizerFigure : public mdc::Figure
set_allowed_resizing(false, false);
}
+ ~SizerFigure()
+ {
+ }
+
virtual void draw_contents(mdc::CairoCtx *cr)
{
double pw= _paper_size.width;
@@ -54,7 +54,7 @@ class wb::Tooltip : public mforms::Popover
void show(int x, int y)
{
_visible = true;
- mforms::Popover::show(x, y, mforms::Right);
+ mforms::Popover::show(x, y, mforms::StartRight);
}
virtual void close()
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -442,10 +442,10 @@ void DbSqlEditorHistory::DetailsModel::load(const std::string &storage_file_path
statement = sql_text.ValueStr();
// decides whether to use or not the existing data
- if (timestamp != _last_timestamp.repr() && timestamp != "~")
+ if (timestamp != _last_timestamp.toString() && timestamp != "~")
_last_timestamp = timestamp;
- if (statement != _last_statement.repr() && statement != "~")
+ if (statement != _last_statement.toString() && statement != "~")
_last_statement = statement;
_data.push_back(_last_statement);
@@ -554,14 +554,14 @@ void DbSqlEditorHistory::DetailsModel::add_entries(const std::list<std::string>
if (index % 2)
{
// decides whether to use or not the existing data
- if (statement != _last_statement.repr())
+ if (statement != _last_statement.toString())
_last_statement = statement;
_data.push_back(_last_statement);
}
else
{
- if (statement != _last_timestamp.repr())
+ if (statement != _last_timestamp.toString())
_last_timestamp = statement;
_data.push_back(_last_timestamp);
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -180,7 +180,7 @@ void DbSqlEditorLog::reset()
_readonly= true;
add_column("", int()); // msg type (icon)
- add_column("", int()); // sequence no.
+ add_column("#", int()); // sequence no.
add_column("Time", std::string());
add_column("Action", std::string());
add_column("Message", std::string());
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -184,7 +184,7 @@ std::string ExecuteRoutineWizard::run()
std::string schema_name = base::quote_identifier_if_needed(*_routine->owner()->name(), '`');
std::string routine_name = base::quote_identifier_if_needed(*_routine->name(), '`');
- if (_routine->routineType() == "procedure")
+ if (base::tolower(_routine->routineType()) == "procedure")
{
std::string parameters_list;
std::string variables_list;
@@ -194,7 +194,7 @@ std::string ExecuteRoutineWizard::run()
{
db_mysql_RoutineParamRef parameter = parameters[i];
bool quote = needs_quoting(parameter->datatype());
- if (parameter->paramType() == "in")
+ if (base::tolower(parameter->paramType()) == "in")
{
// A pure input parameter. Just add it to the parameter list.
if (!parameters_list.empty())
@@ -219,7 +219,7 @@ std::string ExecuteRoutineWizard::run()
result += "set @" + parameter_name + " = ";
std::string value = "0";
- if (parameter->paramType() == "inout")
+ if (base::tolower(parameter->paramType()) == "inout")
value = _edits[edit_index++]->get_string_value();
if (quote && is_quoted(value))
@@ -218,7 +218,7 @@ class SnippetListView : public BaseSnippetList
_snippet_popover->set_read_only(false);
_snippet_popover->set_text(description);
_snippet_popover->set_read_only(true);
- _snippet_popover->show(left_top.first, left_top.second, mforms::Left);
+ _snippet_popover->show(left_top.first, left_top.second, mforms::StartLeft);
}
//------------------------------------------------------------------------------------------------
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -126,7 +126,17 @@ class MYSQLWBBACKEND_PUBLIC_FUNC db_query_EditorConcreteImplData : public db_que
{
boost::shared_ptr<SqlEditorForm> ref(_editor);
if (ref)
- return grt::IntegerRef(_editor->connected() ? 1 : 0);
+ {
+ if (_editor->offline())
+ return grt::IntegerRef(-1);
+ else
+ {
+ if (_editor->connected())
+ return grt::IntegerRef(1);
+ else
+ return grt::IntegerRef(0);
+ }
+ }
return grt::IntegerRef(0);
}
@@ -829,7 +839,7 @@ void WBContextSQLIDE::init()
cmdui->add_builtin_command("query.reconnect", boost::bind(call_reconnect, this));
- cmdui->add_builtin_command("query.stopOnError", boost::bind(call_continue_on_error, this));
+ cmdui->add_builtin_command("query.continueOnError", boost::bind(call_continue_on_error, this));
cmdui->add_builtin_command("query.jump_to_placeholder", boost::bind(&WBContextSQLIDE::call_in_editor_panel, this, &SqlEditorPanel::jump_to_placeholder));
cmdui->add_builtin_command("list-members", boost::bind(&WBContextSQLIDE::call_in_editor_panel, this, &SqlEditorPanel::list_members),
@@ -1515,7 +1515,7 @@ grt::BaseListRef LiveSchemaTree::get_selected_objects()
switch (current_type)
{
case Any:
- case None:
+ case NoneType:
break;
case Schema:
obj->type("db.Schema");
@@ -116,7 +116,7 @@ namespace wb
ForeignKeyColumn,
IndexColumn,
Any,
- None
+ NoneType
};
// This will be used on different object type validations
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -268,15 +268,15 @@ bool SqlEditorForm::load_workspace(const std::string &workspace_name)
if (base::file_exists(bec::make_path(workspace_path, "tab_order")))
{
// new WB 6.2 format workspace
- std::ifstream f(bec::make_path(workspace_path, "tab_order").c_str());
-
+ std::wifstream f;
+ openStream(bec::make_path(workspace_path, "tab_order"), f);
std::vector<std::string> editor_files;
while (!f.eof())
{
- std::string suffix;
+ std::wstring suffix;
f >> suffix;
if (!suffix.empty())
- editor_files.push_back(suffix);
+ editor_files.push_back(base::wstring_to_string(suffix));
}
SqlEditorPanel *editor(add_sql_editor());
@@ -432,6 +432,7 @@ SqlEditorPanel* SqlEditorForm::add_sql_editor(bool scratch, bool start_collapsed
{
SqlEditorPanel* editor(mforms::manage(new SqlEditorPanel(this, scratch, start_collapsed)));
editor->editor_be()->register_file_drop_for(this);
+ editor->editor_be()->set_continue_on_error(continue_on_error());
editor->grtobj()->owner(grtobj());
grtobj()->queryEditors().insert(editor->grtobj());
@@ -578,22 +579,20 @@ void SqlEditorForm::sql_editor_panel_closed(mforms::AppView *view)
void SqlEditorForm::save_workspace_order(const std::string &prefix)
{
- std::ofstream order_file;
if (prefix.empty())
- {
log_error("save with empty path\n");
- }
-
- order_file.open(bec::make_path(prefix, "tab_order").c_str(), std::ofstream::out);
if (_tabdock)
{
+ std::wofstream orderFile;
+ openStream(bec::make_path(prefix, "tab_order"), orderFile);
for (int c = _tabdock->view_count(), i = 0; i < c; i++)
{
SqlEditorPanel *editor = sql_editor_panel(i);
- if (editor)
- order_file << editor->autosave_file_suffix() << "\n";
+ if (editor && orderFile.good())
+ orderFile << base::string_to_wstring(editor->autosave_file_suffix()) << std::endl;
}
+ orderFile.close();
}
}
Oops, something went wrong.

0 comments on commit 406ec7d

Please sign in to comment.