Search Results

Search found 4081 results on 164 pages for 'qt mfc migration'.

Page 12/164 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Way to view Rails Migration output

    - by Ganesh Shankar
    Is there an easy way to see the actual SQL generated by a rails migration? I have a situation where a migration to change a column type worked on my local development machine by partially failed on the production server. My postgreSQL versions are different between local and production (7 on production, 8 on local) so I'm hoping by looking at the SQL generated on the successful migration locally I can work out a SQL statement to run on production to fix things....

    Read the article

  • Rails 3: habtm migration, primary key issue

    - by Brian Wigginton
    I'm trying to setup a migration file for a habtm relationship, however when I run the migration I'm getting the following error: Primary key is not allowed in a has_and_belongs_to_many join table (parts_vehicles). Here is my migration file (20110111035950_create_parts_vehicles.rb): class CreatePartsVehiclesJoinTable < ActiveRecord::Migration def self.up create_table :parts_vehicles, :id => false do |t| t.integer :part_id t.integer :vehicle_id end end def self.down drop_table :parts_vehicles end end The documentation example states to use :id => false to disable a primary key from being generated, but I'm still getting the error.

    Read the article

  • Create ActiveRecord migration then edit in one step?

    - by geosteve
    I find myself doing this a lot: script/generate migration my_new_migration .. then select & copy the generated filename, then paste it into vi to actually write the migration. Is there any way to do this in one step? i.e. when the script/generate migration runs, it creates the file the automatically opens that file in an editor? (I'm working in an SSH terminal window on linux..)

    Read the article

  • qt on Win CE 5.0 crash

    - by Michael
    Good day all, It's the first time I am using Qt on Windows CE and I ran into an issue. Maybe someone can help me with it. I will describe my set up. I am using XP with Visual Studio 2005 an Qt Add-in version 1.1.2. I downloaded Qt source for Windows CE and followed the instructions on these (http://doc.trolltech.com/4.4/install-wince.html) instructions to build the library for CE. I then used the Visual Studio to create a minimal Qt Windows CE Application. The program runs fine in the CE emulator, but once I try to deploy it on the device it crashes with the following message: Load module: qt_ce_3.exe Load module: QtGui4.dll Load module: msvcr80.dll Load module: QtCore4.dll Load module: CEShell.DLL Load module: OLEAUT32.dll Load module: commctrl.dll.0409.MUI Load module: commctrl.dll Load module: aygshell.dll Load module: WS2.dll Load module: WINSOCK.dll Load module: coredll.dll.0409.MUI Load module: ossvcs.dll Load module: ole32.dll Load module: coredll.dll Load module: MMTimer.dll Data Abort: Thread=8fb09a40 Proc=8c4ecea0 'qt_ce_3.exe' AKY=00040001 PC=012a80b0(qtcore4.dll+0x000680b0) RA=012a8168(qtcore4.dll+0x00068168) BVA=676e4574 FSR=000000f5 Unhandled exception at 0x012a80b0 in qt_ce_3.exe: 0xC0000005: Access violation reading location 0x676e4574. I tried it on two devices from different manufacturers, and the result is the same. Debug version worked on one of them, ran out of memory on the other. Does anyone have any idea what this could be? Thanks in advance, Michael

    Read the article

  • Using Qt signals/slots instead of a worker thread

    - by Rob
    I am using Qt and wish to write a class that will perform some network-type operations, similar to FTP/HTTP. The class needs to connect to lots of machines, one after the other but I need the applications UI to stay (relatively) responsive during this process, so the user can cancel the operation, exit the application, etc. My first thought was to use a separate thread for network stuff but the built-in Qt FTP/HTTP (and other) classes apparently avoid using threads and instead rely on signals and slots. So, I'd like to do something similar and was hoping I could do something like this: class Foo : public QObject { Q_OBJECT public: void start(); signals: void next(); private slots: void nextJob(); }; void Foo::start() { ... connect(this, SIGNAL(next()), this, SLOT(nextJob())); emit next(); } void Foo::nextJob() { // Process next 'chunk' if (workLeftToDo) { emit next(); } } void Bar::StartOperation() { Foo* foo = new Foo; foo->start(); } However, this doesn't work and UI freezes until all operations have completed. I was hoping that emitting signals wouldn't actually call the slots immediately but would somehow be queued up by Qt, allowing the main UI to still operate. So what do I need to do in order to make this work? How does Qt achieve this with the multitude of built-in classes that appear to perform lengthy tasks on a single thread?

    Read the article

  • Qt and variadic functions

    - by Noah Roberts
    OK, before lecturing me on the use of C-style variadic functions in C++...everything else has turned out to require nothing short of rewriting the Qt MOC. What I'd like to know is whether or not you can have a "slot" in a Qt object that takes an arbitrary amount/type of arguments. The thing is that I really want to be able to generate Qt objects that have slots of an arbitrary signature. Since the MOC is incompatible with standard preprocessing and with templates, it's not possible to do so with either direct approach. I just came up with another idea: struct funky_base : QObject { Q_OBJECT funky_base(QObject * o = 0); public slots: virtual void the_slot(...) = 0; }; If this is possible then, because you can make a template that is a subclass of a QObject derived object so long as you don't declare new Qt stuff in it, I should be able to implement a derived templated type that takes the ... stuff and turns it into the appropriate, expected types. If it is, how would I connect to it? Would this work? connect(x, SIGNAL(someSignal(int)), y, SLOT(the_slot(...))); If nobody's tried anything this insane and doesn't know off hand, yes I'll eventually try it myself...but I am hoping someone already has existing knowledge I can tap before possibly wasting my time on it.

    Read the article

  • QT QSslError being signaled with the error code set to NoError

    - by Nantucket
    My Problem I compiled OpenSSL into QT to enable OpenSSL support. Everything appeared to go correctly in the compile. However, when I try to use the official HTTP example application that can be found here, everytime I try to download an https page, it will signal two QSslError, each with contents NoError. The types of QSslErrors, including NoError, are documented here, poorly. There is no explanation on why they even included an error type called NoError, or what it means. Bizarrely, the NoError error code seems to be true, as it downloads the remote https document perfectly even while signaling the error. Does anyone have any idea what this means and what could possibly be causing it? Optional Background Reading Here is the relevant part of the code from the example app (this is connected to the network connection's sslErrors signal by the constructor): void HttpWindow::sslErrors(QNetworkReply*,const QList<QSslError> &errors) { QString errorString; foreach (const QSslError &error, errors) { if (!errorString.isEmpty()) errorString += ", "; errorString += error.errorString(); } if (QMessageBox::warning(this, tr("HTTP"), tr("One or more SSL errors has occurred: %1").arg(errorString), QMessageBox::Ignore | QMessageBox::Abort) == QMessageBox::Ignore) { reply->ignoreSslErrors(); } } I have tried the old version of this example, and it produced the same result. I have tried OpenSSL 1.0.0a and 0.9.8o. I have tried tried compiling OpenSSL myself, I have tried using pre-compiled versions of OpenSSL from the net. All produce the same result. If this were my first time using QT with SSL, I would almost think this is the intended result (even though their example application is popping up error warning message windows), if not for the fact that last time I played with QT, using what would now be an old version of QT with an old version of SSL, I distinctly remember everything working fine with no error windows. My system is running Windows 7 x64.

    Read the article

  • Problems after using migration assistant

    - by abchase
    I had migrated from a Xenon Mac Pro to a late 2012 Mac mini, using Migration Assistant. Now, the Mac mini won't recognize PHP. I can't even open my user folder, through terminal neither. I was running Homebrew and PHP 5.4. The Mac mini came out of the box with PHP 5.3 what could be the source of the problem. Can someone confirm that it is a version caused problem or point me in the right direction?

    Read the article

  • Creating a GTK theme, but Qt and Java apps are not affected, and title bar button layout is ugly

    - by Mr. Pixel
    I'm playing with a gtk2 / gtk3 theme which I use in the Mate desktop. Everything is looking well, even gtk3 apps, but I still have 3 important issues: Java apps ignore the theme QT apps ignore the theme I'm using those nice ubuntu 10 title bar buttons, but the problem is, when only the close button appears, the title bar looks ugly. Can I make it so that it shows the two other buttons, but disabled? I don't know how Ubuntu 10 handled this. Here's a screenshot showing the 3 problems (above is a small java app, below is a Qt app): Under my previous desktop environments, Unity and Cinnamon, both apps seemed to be taking the right theme correctly, but I did not use my custom theme yet. Cinnamon is based on gnome-shell by the way, and mate is a gnome2-fork. Please note that the shown java app explicitely tries to load the gtk theme at runtime. By default, java apps don't, but this one has the necessary code, which worked in unity and cinnamon. Any suggestions how I could make my theme better so these problems disappear? Thank you very much!

    Read the article

  • GetPrivateProfileString funtion for MFC application in Win CE

    - by ame
    I understand that WinCE does not support the above function. However as it has been used in the code I am trying to port to Win CE environment, I am trying to rewrite the function to work in Win CE. http://www.codeproject.com/KB/mobile/GetPrivateProfileString.aspx The code at this link does not work as fstream is not supported. Please let me know how I can modify the above code/ rewrite the code for my purpose.

    Read the article

  • Invalidate (MFC) debug assertion failed error message

    - by kobac
    I've made a custom control, and when I want it to repaint on the screen I call Invalidate(), and afterwards UpdateWindow(), but i get message: debug assertion failed for a file afxwin2.inl in line 150 which is: AFXWIN_INLINE void CWnd::Invalidate(BOOL bErase) { ASSERT(::IsWindow(m_hWnd)); ::InvalidateRect(m_hWnd, NULL, bErase); } The thing is that when I run the same app in release mode, it doesn't report any message! So this clue makes me think it's about some environment configuration I should change. What do you think? Thanks.

    Read the article

  • VS2008 C++ MFC Access Violation ONLY when stepping through debug mode

    - by HotOil
    Hi. This is crazy. It started happening in my main project, so I created a tiny sample brand-new project to reproduce it in and sure enough.. It does NOT happen in a sample project I created that is only a Win32 console app. I'm running this on Win7x64, if that matters. VS2008 SP1. Here goes. I create a small dialog app with a button. Put a breakpoint in the handler function for that button. The button handler function looks like this: void CTestProjectDlg::OnBnClickedButton1() { int i=2; m_csHello.Format(_T("Hello World!")); << breakpoint here UpdateData(FALSE); } Click the button, hit the breakpoint. F10 to step, and boom: "First-chance exception at 0x0398f77b in TestProject.exe: 0xC0000005: Access violation." It gives me the option to Break or Continue. If I Continue, it just hits it again, only not "First Chance". Yes I have that exception checked in the Debug-Exceptions dlg. If I Break, the call stack just shows me the line where the breakpoint is. If I F10 again.. I get the exception again, only now the callstack shows me in the _AfxDispatchCmdMsg() function, and my original OnBnClickedButton1() is not in the callstack anymore. It doesn't matter where I put the breakpoint. If, instead of F10, I just continue with F5, it works normally. Now.. if I build a Release version and run in debugging mode: I hit the breakpoint, and all the pointers, variable values look normal. F10, and these turn to garbage. The this pointer is now zero. The m_csHello is now However, in Release mode, an exception is not caught, and it all runs fine. The "hello World string gets displayed in the dialog box as it should. I have put in an inquiry to see if some patch was installed on my box by the IT dept in the last day or two. This wasn't happening 2 days ago. What do you think? Is VS2008 corrupted? Thanks.

    Read the article

  • Accessing a dialog from Another dialog MFC

    - by Isuru
    Hi, I want to open a separate dialog box when I cllick on a button on my main dialog. I used separateDialog.DoModal() to do it. It open successfully but when I try to add data to a edit control (text box) in that seperate dialog, a debug assertion failure occurs. What is the matter and how can I overcome it? Thank You!!

    Read the article

  • How to create a drop down menu in MFC for WINCE

    - by ame
    I have tried the following code in a win32 app that shows a drop down menu on clicking a button. However, this does not work in WinCE as MENUINFO is not defined. Is there any way I can get around this? I need to view a drop down menu on clicking a button, and the name appearing on the button changes depending on the option on the menu. void CTestDlg::OnBnClickedBtnMenu() { if( NULL == m_PopUpMenu.m_hMenu ) { m_PopUpMenu.SetMenuDimension( 120 ); m_PopUpMenu.CreatePopupMenu(); m_PopUpMenu.AppendMenu( MF_STRING | MF_ENABLED | MF_OWNERDRAW, 697, _T("A") ); m_PopUpMenu.AppendMenu( MF_STRING | MF_ENABLED | MF_OWNERDRAW, 697, _T("B") ); m_PopUpMenu.AppendMenu( MF_STRING | MF_ENABLED | MF_OWNERDRAW, 697, _T("C") ); m_PopUpMenu.AppendMenu( MF_STRING | MF_ENABLED | MF_OWNERDRAW, 697, _T("D") ); MENUINFO MenuInfo; memset( &MenuInfo, 0, sizeof(MENUINFO) ); MenuInfo.cbSize = sizeof(MENUINFO); MenuInfo.fMask = MIM_STYLE; MenuInfo.dwStyle = MNS_NOTIFYBYPOS; m_PopUpMenu.SetMenuInfo( &MenuInfo ); }

    Read the article

  • Move application to second monitor in MFC

    - by Anu
    Hi, I m developing applcaiton in VS2008 VC++.net I want to move the application to secondary monitor.Not by clicking and dragging using mouse. Is there any function like MoveToMonitor by pressing the button or any shortcut keys. Then it should move to secondary monitor.

    Read the article

  • What can explain std::cout not to display anything ?

    - by Benoît
    For whatever reason, std::cout does not display anything with my application. The description of my development environment follows. I am working on a Qt application using Qt Creator. Since Qt Creator can't be launched from my station (XP64), i am currently developping it with Visual Studio 2008 and the Qt plugin (by importing the .pro project file). Everything seems fine and the application works. In some cases (depending on command line arguments), i don't want to launch the HIM, just to display a few sentences in the CLI (command line required arguments, for instance). I don't get any error, but nothing is displayed. The corresponding code, which i am sure is run is the (classical) following : std::cout << "is this going to be displayed ?" << std::endl; Do you have any idea why nothing is displayed ?

    Read the article

  • What are useful functions for drawing text (MFC)?

    - by kobac
    I'm creating a line chart control, and I need to write (or better say draw) the axis names and axis values. I found DrawText and TextOut functions, but the text they show is flickering and don't know how to set the font and text orientation (I will need vertical text orientation as well as horizontal). Are there any other functions you could recoommend or how to use these stated above and get the results I need? Thanks in advance. Cheers.

    Read the article

  • How to correctly pop a modeless dialog from console using MFC

    - by Vertilka
    I need to create a console application that has a main() function and pop a modeless dialog, so the console can still work in parallel to the modeless dialog (do other work, like communicating with the modeless dialog). Whatever i tried, i could only pop a modal dialog. (where the console is in hold till the modal dialog close itself). When switching to modeless dialog using Create() and ShowWindow() the dialog is displayed without its controls and it freeze / block (you can see the hourglass cursor). 1) i tried to pop the modeless dialog from the main() function 2) i tried to pop the modeless dialog from the InitInstance() of a CWinApp derived class In all cases the modeless dialog freeze / block. I believe this is a one line solution. TNX,Vertilka

    Read the article

  • [MFC] Combining 2 memory DCs ?

    - by OverTheEdge
    I'm writing a control where there's a lot of custom drawing going through. Because of this I need to trim down the amount of "screen writes" that go about. Currently there is only one memory DC that is used to write to screen so as to avoid flicker when the control is redrawn. I want to know if it is a possiblity to use 2 or more memory DCs to write updates independently and then bitblt them to screen. This way the need to render non-changed parts of the screen is minimized. thanx in advacne, the_Saint

    Read the article

  • MFC CDialog not showing

    - by Jesus_21
    here is my problem : In my Solution, I have 2 projects, one is a lib in which I created a ressource file (mylib.rc) and a dialog template in it. Then I made a class which inherits CDialog and uses this template. But when I instantiate it and call DoModal(), nothing appends... here the code of my class, is something wrong with it ? MyDialog.h /*MyDialog.h*/ #pragma once #include "../../../resource.h" class MyDialog : public CDialog { enum {IDD=IDD_DLGTEMPLATE}; public: MyDialog(CWnd* pParent = NULL); virtual ~MyDialog(); protected: virtual BOOL OnInitDialog(); DECLARE_MESSAGE_MAP() private: afx_msg void OnBnClickedOk(); afx_msg void OnBnClickedCancel(); }; MyDialog.cpp /*MyDialog.cpp*/ #include "stdafx.h" #include "MyDialog.h" MyDialog::MyDialog(CWnd* pParent /*=NULL*/) : CDialog(IDD_DLGTEMPLATE, pParent) {} MyDialog::~MyDialog() {} BOOL MyDialog::OnInitDialog() { return TRUE; } BEGIN_MESSAGE_MAP(MyDialog, CDialog) ON_BN_CLICKED(IDOK, &MyDialog::OnBnClickedOk) ON_BN_CLICKED(IDCANCEL, &MyDialog::OnBnClickedCancel) END_MESSAGE_MAP() void MyDialog::OnBnClickedOk() { OnOK(); } void MyDialog::OnBnClickedCancel() { OnCancel(); }

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >