For one of my projects, I made a QWebView. Everything is working fine, but when I use it at school, I get an error because the proxy is not defined. How would I make it possible to auto detect the proxy, like in Firefox and IE?
I've found this in QNetworkProxyFactory:
setUseSystemConfiguration(bool enable)
But I can't find how to use it.
Since setUseSystemConfiguration is a static method, the following might do what you need:
QNetworkProxyFactory::setUseSystemConfiguration(true);
Here is a working example of using the system defined proxy:
QNetworkProxyQuery npq(QUrl("http://www.google.com"));
QList<QNetworkProxy> listOfProxies = QNetworkProxyFactory::systemProxyForQuery(npq);
if (listOfProxies.size())
QNetworkProxy::setApplicationProxy(listOfProxies[0]);
Related
I'm writing a nuxt module following this guide.
Now I would like my module to add a proxy rule to the host application. Its a lot of guesswork and nothing has done the trick so far. I tried
nuxt.options.proxy.options.push(
{
target: 'https://target-url.com',
changeOrigin: true,
pathFilter: ['path/to/match']
}
)
}
but my IDE complains that proxy is not a known property of NuxtOptions. I did shorten the above code for the sake of this post. In my code I also made sure the respective objects exist before assigning something to them.
next best guess (based on the example for adding a css library) was to do the same thing, but on the runtimeConfig like so:
nuxt.options.runtimeConfig.proxy.options.push(...)
no complaints by the IDE anymore (duh, the runtimeConfig object is of type any) but no sign of the proxy actually working.
I get an error with RKUIManager, or more precisely:
Could not invoke RKUIManager.manageChildren
It appears for example when I'm using firebase with React Native and try to set a reference in the constructor of a component with a prop. For ex:
messagesRef = FBRef.child("Messages").child(this.props.currentMeetingID)
If I change it to the following it works, and yes, I have checked if this.props.currentMeetingID is a legitimate value.
messagesRef = FBRef.child("Messages").child("123456789")
I can't seem to locate the problem nor reproduce it perfectly. I'm just trying to figure out if it's my machine or some kind of bug elsewhere.
Right now I'm just looking for info about what RKUIManager actually is.
If I nullcheck this.props.currentMeetingID I fix it, easy fix but nowhere to be found on the internet so I'll leave it here for anyone passing by. Probably me in a couple of weeks...
I have this in Atom my kepmap file:
'.editor':
'ctrl-i': 'window:toggle-invisibles'
'.editor':
'ctrl-t': 'editor:toggle-indent-guide'
ctrl-t works but ctrl-i doesn't.
Just deleting the
'.editor':
'ctrl-t': 'editor:toggle-indent-guide'
makes ctrl-i work again.
Why would that be? How to I clear the interference?
You'll notice both bindings share the same class even if they don't share the same keystroke, try putting them together like so:
'.editor':
'ctrl-i': 'window:toggle-invisibles'
'ctrl-t': 'editor:toggle-indent-guide'
And you could even be more specific to avoid having them overwritten whenever you install new packages, like so:
'.workspace .editor:not(.mini)':
'ctrl-i': 'window:toggle-invisibles'
'ctrl-t': 'editor:toggle-indent-guide'
That's just an example, you can be even more specific adding .pane, but the previous one does the job.
You can also use the Key Binding Resolver by ctrl+.(that's the "dot" or "period"), or querying the command palette by ctrl+shift+P and searching for resolver, bam you are there (that one you knew for sure, I just mention it for other people who may be reading this and may not be familiar with basic functionality).
The key binding resolver will help you monitor how other bindings may be interfering.
Look:
Let me know if it worked.
For the life of me I can't make durandaljs work with Areas. I'm developing an application with multiple mini SPAs, but I'm not sure how to set up durandaljs to work with it. I wasn't able to find anything online that can drive me in the right direction. The only similar question I found was this one, which is very vague.
My goal is to separate each SPA within it's own folder like so:
App
--areas
----area1
------viewmodels
------views
----area2
------viewmodels
------views
The router doesn't seem to have the concept of areas and no matter how I map the routes I get 404s when I call router.activate('page1'); after mapping with router.mapRoute('page1'); durandal is trying to get /App/viewmodels/page1.js.
Changing it to:
router.mapRoute('areas/area1/viewmodels/page1');
router.activate('areas/area1/viewmodels/page1');
results in another 404 fetching App/viewmodels/areas/area1/viewmodels/page1.js
I've also tried many other combinations which I no longer remember and can't seem to get it to work.
Can someone please post a working example of how to setup durandaljs with the router plugin and multiple mini SPAs (areas)? A link to an article document would also suffice.
You can use viewLocator.useConvention - maybe something like this:
viewLocator.useConvention(
"areas/area1/viewmodels",
"areas/area1/views",
"areas/area1/templates"
);
One good thing to realize is that useConvention() works in conjunction with any existing require.config paths setting. In other words, if you set the require.config so that "viewModels" and "views" are mapped to the right folders, then all is well.
For example, the code snippet above is functionally equivalent to:
window.require.config({
paths: {
"viewModels": "areas/area1/viewmodels",
"views": "areas/area1/views",
"templates": "areas/area1/templates"
}
viewLocator.useConvention("viewmodels", "views", "templates");
I a similar structure implemented in my application. I think that you have to put this piece of code, to do the viewLocator works properly.
viewLocator.useConvention(); //You can do that in you main.js
You can see more information here: http://durandaljs.com/documentation/View-Locator/
Also I recommed you to look the code of viewLocator.js, especially, the code of useConventionMethod.
Other possibility is to override the method convertModuleIdToViewId, to make it works as you want. But I think that using useConvention methos is enought.
I would like to use a different base hub URL than ~/signalr/hubs. How to modify this url, for example to ~/api/hubs?
Second question, may I use a different url for a different sets of hubs? For example:
~/api/chat/hubs
~/api/email/hubs
Thanks.
Ran across this, possible now with 0.5+:
RouteTable.Routes.MapHubs("~/api");
No you may not, it's hardcoded in the source.
No the proxy generated is for all hubs.
Well this question is old (4 years? wtf.. I always thought web sockets was kinda new).
... Well they(Microsoft) have new descriptive well written documentation on their website now
This could be a link only answer but if you are in a hurry.... On the server side at the startup or owin app config have somthing like this...
app.MapSignalR("/newCoolUrl", new HubConfiguration());
Ehhh sure you need to replace everything "/signalr" on whichever clients you are using to "/newCoolUrl" example
var connection = $.hubConnection("/newCoolUrl", { useDefaultPath: false });