summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Kallai <kadam@inf.u-szeged.hu>2015-02-05 15:23:23 +0100
committerAdam Kallai <kadam@inf.u-szeged.hu>2015-02-06 11:52:02 +0000
commit1a744ca48513fe8aaa8edb31adfa534effb89683 (patch)
tree26c8e43faad4ab87c315889042cb2e81c556abdc
parent32766eb94eb06bec449a3bd8d518b6a638f79400 (diff)
Fix the fileListingHelper template function specialisation
The WebContentsAdapter::filesSelectedInChooser function parameter type has been changed since the Chromium update. Thus content::FileChooserFileInfo has to be used instead of ui::SelectedFileInfo. Change-Id: Ia6a50409f3f7c704228cb739fc50d694e633dbee Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
-rw-r--r--src/core/type_conversion.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/type_conversion.h b/src/core/type_conversion.h
index 781023b7c..6bb755abc 100644
--- a/src/core/type_conversion.h
+++ b/src/core/type_conversion.h
@@ -46,10 +46,10 @@
#include <QUrl>
#include "base/files/file_path.h"
#include "base/time/time.h"
+#include "content/public/common/file_chooser_file_info.h"
#include "third_party/skia/include/utils/SkMatrix44.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/rect.h"
-#include "ui/shell_dialogs/selected_file_info.h"
#include "url/gurl.h"
inline QString toQt(const base::string16 &string)
@@ -158,10 +158,13 @@ template <typename T>
inline T fileListingHelper(const QString &) {qFatal("Specialization missing for %s.", Q_FUNC_INFO); return T(); }
template <>
-inline ui::SelectedFileInfo fileListingHelper<ui::SelectedFileInfo>(const QString &file)
+inline content::FileChooserFileInfo fileListingHelper<content::FileChooserFileInfo>(const QString &file)
{
- base::FilePath fp(toFilePathString(file));
- return ui::SelectedFileInfo(fp, fp);
+ content::FileChooserFileInfo choose_file;
+ base::FilePath fp(toFilePath(file));
+ choose_file.file_path = fp;
+ choose_file.display_name = fp.BaseName().value();
+ return choose_file;
}
template <>