So Jest seems to be broken out of the box right now, when creating a React Native App with Expo.
Steps to reproduce:
`expo init'
Choose tabs.
cd into your app.
Run npm test 👉🏻 Fails
I googled and tried out the following fixes:
A) Add jest.config.js:
module.exports = {
preset: 'jest-expo',
transform: {
'\\.js$': '<rootDir>/node_modules/react-native/jest/preprocessor.js',
}
};
B) Copy react-natives preprocessor in your own `jest.preprcessor.js' file:
transform: {
/*
* Stop jest from falling over on its face.
* cf. https://github.com/expo/expo/issues/2595#issuecomment-440966998
* cf. https://github.com/facebook/react-native/issues/22175#issuecomment-436959462
*/
'\\.js$': '<rootDir>/jest.preprocessor.js',
},
C) Changing the "test" scripts section
from:
"test": "node_modules/.bin/jest"
to:
"test": "node ./node_modules/jest/bin/jest.js"
So nothing works 😓 All approaches result in some or all tests failing.
Does anyone know how to get jest to work with Expo 32?
Edit: Bruno's answer works. Additionally, make sure to delete your node_modules and package-lock.json before running yarn. Furthermore, you don't need a jest.config.js. And you also don't need Bruno's babel.config.js. Here is mine:
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
};
};
It's so weird that it doesn't work for npm.
PS, here is the preprocessor code so you don't have to search it:
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* #format
* #flow
*/
/* eslint-env node */
'use strict';
const {transformSync: babelTransformSync} = require('#babel/core');
/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error
* found when Flow v0.54 was deployed. To see the error delete this comment and
* run Flow. */
const babelRegisterOnly = require('metro-babel-register');
/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error
* found when Flow v0.54 was deployed. To see the error delete this comment and
* run Flow. */
const createCacheKeyFunction = require('fbjs-scripts/jest/createCacheKeyFunction');
const generate = require('#babel/generator').default;
const nodeFiles = RegExp(
[
'/local-cli/',
'/metro(?:-[^/]*)?/', // metro, metro-core, metro-source-map, metro-etc
].join('|'),
);
const nodeOptions = babelRegisterOnly.config([nodeFiles]);
babelRegisterOnly([]);
/* $FlowFixMe(site=react_native_oss) */
const transformer = require('metro/src/reactNativeTransformer');
module.exports = {
process(src /*: string */, file /*: string */) {
if (nodeFiles.test(file)) {
// node specific transforms only
return babelTransformSync(src, {
filename: file,
sourceType: 'script',
...nodeOptions,
ast: false,
}).code;
}
const {ast} = transformer.transform({
filename: file,
localPath: file,
options: {
ast: true, // needed for open source (?) https://github.com/facebook/react-native/commit/f8d6b97140cffe8d18b2558f94570c8d1b410d5c#r28647044
dev: true,
inlineRequires: true,
minify: false,
platform: '',
projectRoot: '',
retainLines: true,
sourceType: 'unambiguous', // b7 required. detects module vs script mode
},
src,
plugins: [
[require('#babel/plugin-transform-block-scoping')],
// the flow strip types plugin must go BEFORE class properties!
// there'll be a test case that fails if you don't.
[require('#babel/plugin-transform-flow-strip-types')],
[
require('#babel/plugin-proposal-class-properties'),
// use `this.foo = bar` instead of `this.defineProperty('foo', ...)`
{loose: true},
],
[require('#babel/plugin-transform-computed-properties')],
[require('#babel/plugin-transform-destructuring')],
[require('#babel/plugin-transform-function-name')],
[require('#babel/plugin-transform-literals')],
[require('#babel/plugin-transform-parameters')],
[require('#babel/plugin-transform-shorthand-properties')],
[require('#babel/plugin-transform-react-jsx')],
[require('#babel/plugin-transform-regenerator')],
[require('#babel/plugin-transform-sticky-regex')],
[require('#babel/plugin-transform-unicode-regex')],
[
require('#babel/plugin-transform-modules-commonjs'),
{strict: false, allowTopLevelThis: true},
],
[require('#babel/plugin-transform-classes')],
[require('#babel/plugin-transform-arrow-functions')],
[require('#babel/plugin-transform-spread')],
[require('#babel/plugin-proposal-object-rest-spread')],
[
require('#babel/plugin-transform-template-literals'),
{loose: true}, // dont 'a'.concat('b'), just use 'a'+'b'
],
[require('#babel/plugin-transform-exponentiation-operator')],
[require('#babel/plugin-transform-object-assign')],
[require('#babel/plugin-transform-for-of'), {loose: true}],
[require('#babel/plugin-transform-react-display-name')],
[require('#babel/plugin-transform-react-jsx-source')],
],
});
return generate(
ast,
{
code: true,
comments: false,
compact: false,
filename: file,
retainLines: true,
sourceFileName: file,
sourceMaps: true,
},
src,
).code;
},
getCacheKey: createCacheKeyFunction([
__filename,
require.resolve('metro/src/reactNativeTransformer'),
require.resolve('#babel/core/package.json'),
]),
};
My dependencies:
"dependencies": {
"#expo/samples": "2.1.1",
"expo": "^32.0.0",
"formik": "^1.5.0",
"i18n-js": "^3.2.1",
"prop-types": "^15.7.1",
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
"react-navigation": "^3.0.9",
"yup": "^0.26.10"
},
"devDependencies": {
"babel-eslint": "^10.0.1",
"babel-preset-expo": "^5.0.0",
"eslint": "^5.13.0",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-react": "^7.12.4",
"eslint-plugin-react-native": "^3.6.0",
"eslint-plugin-react-native-a11y": "^1.2.0",
"eslint-plugin-simple-import-sort": "^3.0.0",
"jest-expo": "^32.0.0",
"react-native-elements": "^1.0.0",
"react-native-testing-library": "^1.5.0"
},
Your dependecies and devDependencies seem fine.
First thing, install yarn. Follow this link for instructions.
Second, you must alter a few things in your package.json. Like this:
"scripts": {
"test": "jest",
...
},
"jest": {
"preset": "jest-expo",
"transform": {
"^.+\\.js$": "babel-jest"
},
}
Third, ensure your babel.config.js is setup correctly. Here's the one from my project running Expo's SDK 32:
module.exports = function (api) {
api.cache(true);
return {
presets: [
'babel-preset-expo',
'module:react-native-dotenv',
],
sourceMaps: true,
plugins: [
'#babel/transform-react-jsx-source',
],
};
};
Lastly, use yarn to install your packages yarn install and to run your tests yarn test.
Related
Please help, i spent 2 days trying simply to use Datastore of amplify. Am building NPM package to wrap an Amplify project backend. Auth works good but datastore not.
Am testing code with ts-node and Jest. It is package so i do not have a framework.
When i call the save function it does not work and throw this warning:
[WARN] 24:08.886 DataStore - Data won't be synchronized. No GraphQL endpoint configured. Did you forget `Amplify.configure(awsconfig)`? {
config: {
authProviders: undefined,
maxRecordsToSync: 10000,
syncPageSize: 1000
}
}
My api endpoint is 100% correct, also the api-key. The backend works in another project built with react. But in my case (NPM package) it does not work.
The script am trying to run:
import { DataStore } from '#aws-amplify/datastore';
import { AccountDetails } from '#/models';
import { SignUp } from "#/Authentication/SignUp";
import InvalidAccountRequirementsException from "#/Exceptions/InvalidAccountRequirementsException";
import "#/app.config";
/**
* #name CreateAccount
* #description:
* build the correct pattern to check specific string type.
*
* #type function
* #param email
* #param password
* #param hasOwnCompany
* #param optInMarketingEmail
* #param tacAgreed
* #constructor
* #return {Promise<AccountDetails>}
*/
const CreateAccount = async (
email: string,
password: string,
hasOwnCompany: boolean,
optInMarketingEmail: boolean,
tacAgreed: boolean,
): Promise<AccountDetails> => {
if (!tacAgreed) {
throw new InvalidAccountRequirementsException('Terms and conditions mus be agreed');
}
const user = await SignUp(email, password);
return await DataStore.save(
new AccountDetails({
cognitoSubId: user.userSub,
email: email,
optInMarketingEmail: optInMarketingEmail,
tacAgreed: tacAgreed,
hasOwnCompany: hasOwnCompany,
})
);
}
export default CreateAccount;
app.conf.ts
import Amplify from 'aws-amplify';
import awsExports from '#/aws-exports';
Amplify.configure(awsExports);
package.json
{
"name": "#financiallease/driver-seat-amplify-api",
"version": "1.0.0",
"description": "",
"author": "itsupport#financiallease.nl",
"main": "dist/financiallease.cjs.js",
"module": "dist/financiallease.es.js",
"browser": "dist/financiallease.js",
"license": "ISC",
"scripts": {
"build": "rollup -c",
"lint": "eslint --config eslint.config.js '{src,test}/**/*.ts' --no-ignore",
"autoformat": "eslint --config eslint.config.js '{src,test}/**/*.ts' --no-ignore --fix",
"test": "jest -c jest.config.ts",
"coverage": "jest --collectCoverage --coverageDirectory=\"./coverage\" --ci --reporters=default --reporters=jest-junit --watchAll=false",
"docs:generate": "typedoc --readme README.md --entryPoints src --entryPointStrategy expand --out docs --theme hierarchy --name \"Driver Seat Amplify Api - docs\" --includeVersion",
"amplify-modelgen": "node amplify/scripts/amplify-modelgen.js",
"amplify-push": "node amplify/scripts/amplify-push.js"
},
"publishConfig": {
"#financiallease:registry": "https://gitlab.com/api/v4/projects/35071033/packages/npm/"
},
"dependencies": {
"#aws-amplify/core": "^4.5.1",
"#aws-amplify/datastore": "^3.11.0",
"#rollup/plugin-alias": "^3.1.9",
"aws-amplify": "^4.3.19",
"dotenv": "^16.0.0",
"ts-node": "^10.7.0",
"typescript": "^4.6.3"
},
"devDependencies": {
"#babel/core": "^7.17.9",
"#babel/preset-env": "^7.16.11",
"#babel/preset-typescript": "^7.16.7",
"#rollup/plugin-babel": "^5.3.1",
"#rollup/plugin-commonjs": "^21.0.3",
"#rollup/plugin-node-resolve": "^13.1.3",
"#rollup/plugin-typescript": "^8.3.1",
"#types/amplify": "^1.1.25",
"#types/jest": "^27.4.1",
"#types/node": "^17.0.30",
"#typescript-eslint/eslint-plugin": "^5.18.0",
"#typescript-eslint/parser": "^5.18.0",
"babel-jest": "^28.0.3",
"babel-plugin-module-resolver": "^4.1.0",
"eslint": "^8.12.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-react": "^7.29.4",
"esm": "^3.2.25",
"jest": "^27.5.1",
"jest-junit": "^13.2.0",
"jsdoc": "^3.6.10",
"nodemon": "^2.0.16",
"rollup": "^2.70.1",
"rollup-plugin-terser": "^7.0.2",
"ts-jest": "^27.1.4",
"tsconfig-paths": "^3.14.1",
"tslib": "^2.3.1",
"typedoc": "^0.22.15",
"typedoc-theme-hierarchy": "^1.1.1",
"ini": "^1.3.5",
"inquirer": "^6.5.1"
}
}
Any ideas?
I'm trying to batch create a bunch of intents, and I want to assign an Input context
As far as I can see this should not need a session as it's just a string context name.
Like this in the GUI:
The API call I make creates the intent,
doesn't throw an error,
but I can't get the contexts to show up.
Is there some weird format to the contexts parameter?
I've exported the zip and looked at the JSON files, they're just an array of strings.
I've seen other code that seems to require a user conversation sessionId to create contexts. But the intents are global - not for a single conversation. And I assume these are just for tracking context within a single conversation session (or google astronaut engineering)
The data I'm POSTing looks like the below
There's a google example here that doesn't touch contexts
https://cloud.google.com/dialogflow/es/docs/how/manage-intents#create_intent
I've tried contexts as various formats without success
// this is the part that doesn't work
// const contexts = [{
// // name: `${sessionPath}/contexts/${name}`,
// // name: 'test context name'
// }]
const contexts = [
'theater-critics'
]
createIntentRequest {
"parent": "projects/XXXXXXXX-XXXXXXXX/agent",
"intent": {
"displayName": "test 4",
"trainingPhrases": [
{
"type": "EXAMPLE",
"parts": [
{
"text": "this is a test phrase"
}
]
},
{
"type": "EXAMPLE",
"parts": [
{
"text": "this is a another test phrase"
}
]
}
],
"messages": [
{
"text": {
"text": [
"this is a test response"
]
}
}
],
"contexts": [
"theater-critics"
]
}
}
Intent projects/asylum-287516/agent/intents/XXXXXXXX-e852-4c09-bda6-e524b8329db8 created
Full JS (TS) code below for anyone else
import { DfConfig } from './DfConfig'
const dialogflow = require('#google-cloud/dialogflow');
const testData = {
displayName: 'test 4',
trainingPhrasesParts: [
"this is a test phrase",
"this is a another test phrase"
],
messageTexts: [
'this is a test response'
]
}
// const messageTexts = 'Message texts for the agent's response when the intent is detected, e.g. 'Your reservation has been confirmed';
const intentsClient = new dialogflow.IntentsClient();
export const DfCreateIntent = async () => {
const agentPath = intentsClient.agentPath(DfConfig.projectId);
const trainingPhrases = [];
testData.trainingPhrasesParts.forEach(trainingPhrasesPart => {
const part = {
text: trainingPhrasesPart,
};
// Here we create a new training phrase for each provided part.
const trainingPhrase = {
type: 'EXAMPLE',
parts: [part],
};
// #ts-ignore
trainingPhrases.push(trainingPhrase);
});
const messageText = {
text: testData.messageTexts,
};
const message = {
text: messageText,
};
// this is the part that doesn't work
// const contexts = [{
// // name: `${sessionPath}/contexts/${name}`,
// // name: 'test context name'
// }]
const contexts = [
'theater-critics'
]
const intent = {
displayName: testData.displayName,
trainingPhrases: trainingPhrases,
messages: [message],
contexts
};
const createIntentRequest = {
parent: agentPath,
intent: intent,
};
console.log('createIntentRequest', JSON.stringify(createIntentRequest, null, 2))
// Create the intent
const [response] = await intentsClient.createIntent(createIntentRequest);
console.log(`Intent ${response.name} created`);
}
// createIntent();
update figured out based on this
https://cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.agent.intents#Intent
const contextId = 'runner'
const contextName = `projects/${DfConfig.projectId}/agent/sessions/-/contexts/${contextId}`
const inputContextNames = [
contextName
]
const intent = {
displayName: testData.displayName,
trainingPhrases: trainingPhrases,
messages: [message],
inputContextNames
};
In my stylelintrc.js
module.exports = {
"extends": [
"stylelint-config-standard",
"stylelint-config-css-modules",
],
"plugins": [
"stylelint-performance-animation",
],
...
In codeclimat.yaml i turn on stylelint engine and take this error on codeclimete
•• Timing: .engineConfig: 0.049s
Error: Could not find "stylelint-config-css-modules". Do you need a configBasedir?
See our documentation at https://docs.codeclimate.com/docs/stylelint for more information.
Can somebody explain me how enable plugins ands extends if it posible?
This is an answer for anyone coming here from google:
Weirdly enough stylelint needs to be given the absolue path of the node_modules folder. Below is a working solution:
const { resolve } = require('path')
const basePath = resolve(__dirname, 'node_modules')
const groupSelectors = `${basePath}/stylelint-group-selectors`
const cssTreeValidator = `${basePath}/stylelint-csstree-validator`
module.exports = {
plugins: [groupSelectors, cssTreeValidator],
extends: [
'stylelint-config-recommended-scss',
'stylelint-config-recess-order',
'stylelint-prettier/recommended',
'stylelint-scss',
'stylelint-a11y/recommended',
],
rules: {
'no-empty-source': null,
//check and add avaialble rules here: https://github.com/kristerkari/stylelint-scss
'scss/selector-no-redundant-nesting-selector': true,
'plugin/stylelint-group-selectors': true,
'csstree/validator': true,
},
}
AOSP now has new build system, and file Android.bp has replaced Android.mk in many places.
Now I want to list source files conditionally depending on platform.
Say something like this:
if(atom)
{
src: [
.......list of files.......
],
exclude_srcs: [
.......list of files.......
]
} else
{
src: [
.......list of files.......
],
exclude_srcs: [
.......list of files.......
]
}
Any suggestions how to achieve this?
Also, how can I achieve logical operations like NOT, OR etc in conditionals?
Thanks in advance.
Quote from documentation:
By design, Android.bp files are very simple. There are no conditionals or control flow statements - any complexity is handled in build logic written in Go.
You can read it here.
GO
You can write a go script with your conditions. Follow
Is there a way to add/remove module in Android.bp?
What is art.go? And why is it considered a way to write conditionals in bp files?
Conditional compilation
If you just want to include a module conditionally you can define many Android.bp modules and include them based on conditions in Android.mk files.
https://android.googlesource.com/platform/build/soong/+/HEAD/docs/best_practices.md#removing-conditionals
soong_config_modules
You will face parsing errors if any of your Android.bp files include libraries not supported by your AOSP.
To fix that you can use soong_config_modules. Note that this is supported only Android 11 R onwards.
Details are given in https://android.googlesource.com/platform/build/soong/+/refs/heads/master/android/soong_config_modules.go
However, I'll give you an example.
Here I am including special libraries when the AOSP is Android 12. Since these libraries might not be present on lower versions, I will not include iot-camera-system.mk in PRODUCT_PACKAGES so it will not be included as a preinstalled app.
What specifically I will achieve with soong_config_modules is removal of parsing errors when these libraries are not present (Android parses all Android.bp files to form a parse tree, it also checks for the existence of their dependencies and build fails when they are not present).
iot-camera-system.mk
# CameraApp Android Application Package
ifeq ($(PLATFORM_VERSION), $(filter $(PLATFORM_VERSION),S 12))
PRODUCT_PACKAGES += CameraApp
SOONG_CONFIG_NAMESPACES += camera
SOONG_CONFIG_camera += camtargets
SOONG_CONFIG_camera_camtargets := newCameraTarget
else
SOONG_CONFIG_NAMESPACES += camera
SOONG_CONFIG_camera += camtargets
SOONG_CONFIG_camera_camtargets := oldCameraTarget
endif
Android.bp
// This introduces the module type camera_cc_defaults
// If target.mk file contained:
//
// SOONG_CONFIG_NAMESPACES += camera
// SOONG_CONFIG_camera += camtargets
// SOONG_CONFIG_camera_camtargets := newCameraTarget
//
// Then our libs would build with static_libs
soong_config_module_type {
name: "camera_cc_defaults",
module_type: "cc_defaults",
config_namespace: "camera",
variables: ["camtargets"],
properties: ["static_libs"],
}
soong_config_string_variable {
name: "camtargets",
values: ["oldCameraTarget", "newCameraTarget"],
}
camera_cc_defaults {
name: "camera_defaults",
soong_config_variables: {
camtargets: {
oldCameraTarget: {
static_libs: [
],
},
newCameraTarget: {
static_libs: [
"androidx.core_core-ktx",
"androidx.fragment_fragment-ktx",
"androidx.navigation_navigation-fragment-ktx",
"androidx.navigation_navigation-ui-ktx",
"androidx.lifecycle_lifecycle-runtime-ktx",
"kotlinx_coroutines",
"kotlinx_coroutines_android",
],
},
},
},
}
android_library {
name: "utils",
defaults: ["camera_defaults"],
manifest: "utils/src/main/AndroidManifest.xml",
platform_apis: true,
srcs: [
"utils/src/main/java/com/example/android/camera/utils/*.kt",
],
resource_dirs: [
"utils/src/main/res/",
],
static_libs: [
"androidx-constraintlayout_constraintlayout",
"androidx.appcompat_appcompat",
"androidx.localbroadcastmanager_localbroadcastmanager",
"com.google.android.material_material",
"androidx.exifinterface_exifinterface",
"androidx.core_core",
"androidx.preference_preference",
"androidx.fragment_fragment",
"androidx.recyclerview_recyclerview",
"androidx.lifecycle_lifecycle-runtime",
"androidx.lifecycle_lifecycle-extensions",
"kotlin-stdlib",
"kotlin-reflect",
"gson-prebuilt-jar",
],
optimize: {
enabled: false,
},
dex_preopt: {
enabled: false,
},
}
android_app {
name: "CameraApp",
defaults: ["camera_defaults"],
manifest: "app/src/main/AndroidManifest.xml",
privileged: true,
platform_apis: true,
certificate: "platform",
srcs: [
"app/src/main/java/com/example/android/camera2/video/*.kt",
"app/src/main/java/com/example/android/camera2/video/fragments/*.kt",
"app/src/main/java/com/example/android/camera2/video/overlay/*.kt",
],
resource_dirs: [
"app/src/main/res/",
],
static_libs: [
"androidx-constraintlayout_constraintlayout",
"androidx.appcompat_appcompat",
"androidx.localbroadcastmanager_localbroadcastmanager",
"com.google.android.material_material",
"androidx.exifinterface_exifinterface",
"androidx.core_core",
"androidx.preference_preference",
"androidx.fragment_fragment",
"androidx.recyclerview_recyclerview",
"androidx.lifecycle_lifecycle-runtime",
"androidx.lifecycle_lifecycle-extensions",
"kotlin-stdlib",
"kotlin-reflect",
"gson-prebuilt-jar",
"utils",
],
optimize: {
enabled: false,
},
dex_preopt: {
enabled: false,
},
}
this a sample on how to add a conditional in a bp file:
cc_library {
...
srcs: ["generic.cpp"],
arch: {
arm: {
srcs: ["arm.cpp"],
},
x86: {
srcs: ["x86.cpp"],
},
},
}
It is possible to use geolocation in Desktop applications with QWebView?
I tried Qt WebKit and HTML5 geolocation, but not work.
I tried it's the qt5 position api support for desktop app(like mac or windows), but the answer is on the QT APIs, I believe it is possible to customize the "event" in some way, as is done using qwebkitplatformplugin to customize some features of qtwebkit (MultipleSelections, Notifications, Haptics, TouchInteraction, FullScreenVideoPlayer and SpellChecker).
I tried set PermissionGrantedByUser, but not work:
void WebPage::permissionRequested(QWebFrame* frame, Feature feature)
{
switch (feature) {
case Geolocation:
qDebug() << "GEO-Location: PermissionGrantedByUser";
setFeaturePermission(frame, feature, PermissionGrantedByUser);
break;
default:
qDebug() << "";
}
}
I tried add this QT += positioning, but not work
I tried add this TARGET.CAPABILITY += NetworkServices Location, but not work, I believe this is for smartphones, like Symbian.
Event displayLocation and watchPosition are never fired and using {timeout: ...} it shows the message Timeout expired:
<script>
function displayError(err) {
document.getElementById("geo").innerHTML = ("Error Code: " + err.code +
" / msg: " + err.message);
}
function displayLocation(position) {
document.getElementById("geo").innerHTML = [
"latitude:" + position.coords.latitude,
"longitude:" + position.coords.longitude
].join(", ");
}
function getMyLocation() {
if (navigator.geolocation) {
navigator.geolocation.watchPosition(function(a, b, c) {
console.log(a, b, c);
document.getElementById("geo").innerHTML = "Testando...";
});
navigator.geolocation.getCurrentPosition(displayLocation, displayError, {
enableHighAccuracy: false,
timeout: 10000,
maximumAge: 0
});
} else {
document.getElementById("geo").innerHTML = "No geolocation support";
}
}
window.onload = function() {
getMyLocation();
};
</script>
<div id="geo"></div>
I believe that I have to build a library and put in the qtDir/compiler/plugins/position folder, but do not know where to start.
How can I do this?
Or is it possible to customize the event and send coordinates of a 3rdparty lib (I'm not asking for a library and I'm not asking for alternatives in javascript) in response to the navigator.geolocation.getCurrentPosition?
Extra info about
If use QT_DEBUG_PLUGINS=1 in debug mode Application Output return this (note that the first line is generated by WebPage::permissionRequested):
GEO-Location: PermissionGrantedByUser
QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt5.4.0/5.4/mingw491_32/plugins/position" ...
QFactoryLoader::QFactoryLoader() looking at "C:/Qt5.4.0/5.4/mingw491_32/plugins/position/qtposition_positionpoll.dll"
Found metadata in lib C:/Qt5.4.0/5.4/mingw491_32/plugins/position/qtposition_positionpoll.dll, metadata=
{
"IID": "org.qt-project.qt.position.sourcefactory/5.0",
"MetaData": {
"Keys": [
"positionpoll"
],
"Monitor": true,
"Position": false,
"Priority": 1000,
"Provider": "positionpoll",
"Satellite": false
},
"className": "QGeoPositionInfoSourceFactoryPoll",
"debug": false,
"version": 328704
}
"The plugin 'C:/Qt5.4.0/5.4/mingw491_32/plugins/position/qtposition_positionpoll.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
not a plugin
QFactoryLoader::QFactoryLoader() looking at "C:/Qt5.4.0/5.4/mingw491_32/plugins/position/qtposition_positionpolld.dll"
Found metadata in lib C:/Qt5.4.0/5.4/mingw491_32/plugins/position/qtposition_positionpolld.dll, metadata=
{
"IID": "org.qt-project.qt.position.sourcefactory/5.0",
"MetaData": {
"Keys": [
"positionpoll"
],
"Monitor": true,
"Position": false,
"Priority": 1000,
"Provider": "positionpoll",
"Satellite": false
},
"className": "QGeoPositionInfoSourceFactoryPoll",
"debug": true,
"version": 328704
}
Got keys from plugin meta data ("positionpoll")
QFactoryLoader::QFactoryLoader() checking directory path "C:/projects/webview-example/debug/position" ...