diff --git a/lib/capybara_webkit_builder.rb b/lib/capybara_webkit_builder.rb index 711239b..a202f15 100644 --- a/lib/capybara_webkit_builder.rb +++ b/lib/capybara_webkit_builder.rb @@ -16,32 +16,17 @@ module CapybaraWebkitBuilder ENV['QMAKE'] || default_qmake_binary end - def spec - ENV['SPEC'] || os_spec - end - def default_qmake_binary case RbConfig::CONFIG['host_os'] when /freebsd/ "qmake-qt4" + when /openbsd/ + "qmake-qt5" else "qmake" end end - def os_spec - case RbConfig::CONFIG['host_os'] - when /linux/ - "linux-g++" - when /freebsd/ - "freebsd-g++" - when /mingw32/ - "win32-g++" - else - "macx-g++" - end - end - def sh(command) system(command) success = $?.exitstatus == SUCCESS_STATUS @@ -56,7 +41,7 @@ module CapybaraWebkitBuilder def makefile(*configs) configs += default_configs configs = configs.map { |config| config.shellescape}.join(" ") - sh("#{qmake_bin} -spec #{spec} #{configs}") + sh("#{qmake_bin} #{configs}") end def qmake diff --git a/spec/capybara_webkit_builder_spec.rb b/spec/capybara_webkit_builder_spec.rb index 1ef7ea1..1b7a37c 100644 --- a/spec/capybara_webkit_builder_spec.rb +++ b/spec/capybara_webkit_builder_spec.rb @@ -16,12 +16,6 @@ describe CapybaraWebkitBuilder do end end - it "will use the env variable for #os_spec" do - with_env_vars("SPEC" => "fake_os_spec") do - builder.spec.should == "fake_os_spec" - end - end - it "defaults the #make_bin" do with_env_vars("MAKE_BIN" => nil) do builder.make_bin.should == 'make' @@ -33,11 +27,5 @@ describe CapybaraWebkitBuilder do builder.qmake_bin.should == 'qmake' end end - - it "defaults #spec to the #os_specs" do - with_env_vars("SPEC" => nil) do - builder.spec.should == builder.os_spec - end - end end diff --git a/src/StdinNotifier.cpp b/src/StdinNotifier.cpp index b439402..7719c6f 100644 --- a/src/StdinNotifier.cpp +++ b/src/StdinNotifier.cpp @@ -1,6 +1,8 @@ #include "StdinNotifier.h" #include +#include +#include StdinNotifier::StdinNotifier(QObject *parent) : QObject(parent) { m_notifier = new QSocketNotifier(fileno(stdin), QSocketNotifier::Read, this); diff --git a/src/WebPage.h b/src/WebPage.h index e3880bd..65900f8 100644 --- a/src/WebPage.h +++ b/src/WebPage.h @@ -1,5 +1,6 @@ #ifndef _WEBPAGE_H #define _WEBPAGE_H +#include #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) #include #else