Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Developer
Posts: 11
Registered: ‎12-08-2012
My Device: Torch 9860
My Carrier: Vodafone uk

make: ***[debug] Error 2

Hello all, im getting this issue when trying to debug my app on my Z10

 

22:03:46 **** Incremental Build of configuration Device-Debug for project TestBrowser ****
make -j2 Device-Debug 
make -C .//translations -f Makefile update
make[1]: Entering directory `C:/Users/Lucas/momentics-workspace/TestBrowser/translations'
C:/bbndk/host_10_2_0_15/win32/x86/usr/bin/lupdate TestBrowser.pro
Updating 'TestBrowser.ts'...
    Found 3 source text(s) (0 new and 3 already existing)
make[1]: Leaving directory `C:/Users/Lucas/momentics-workspace/TestBrowser/translations'
make -C .//translations -f Makefile release
make[1]: Entering directory `C:/Users/Lucas/momentics-workspace/TestBrowser/translations'
C:/bbndk/host_10_2_0_15/win32/x86/usr/bin/lrelease TestBrowser.pro
Updating 'C:/Users/Lucas/momentics-workspace/TestBrowser/translations/TestBrowser.qm'...
    Generated 1 translation(s) (1 finished and 0 unfinished)
    Ignored 3 untranslated source text(s)
make[1]: Leaving directory `C:/Users/Lucas/momentics-workspace/TestBrowser/translations'
make -C ./arm -f Makefile debug
make[1]: Entering directory `C:/Users/Lucas/momentics-workspace/TestBrowser/arm'
make -f Makefile.Debug
make[2]: Entering directory `C:/Users/Lucas/momentics-workspace/TestBrowser/arm'
C:/bbndk/host_10_2_0_15/win32/x86/usr/bin/moc.exe -DQT_NO_IMPORT_QT47_QML -DQ_OS_BLACKBERRY -DQT_DECLARATIVE_DEBUG -DQT_DECLARATIVE_LIB -DQT_CORE_LIB -DQT_SHARED -Ic:/bbndk/target_10_2_0_1155/qnx6/usr/share/qt4/mkspecs/blackberry-armv7le-qcc -I../../TestBrowser -Ic:/bbndk/target_10_2_0_1155/qnx6/usr/include/qt4/QtCore -Ic:/bbndk/target_10_2_0_1155/qnx6/usr/include/qt4/QtDeclarative -Ic:/bbndk/target_10_2_0_1155/qnx6/usr/include/qt4 -I../src -Io.le-v7-g/.moc -Ic:/bbndk/target_10_2_0_1155/qnx6/usr/include -Ic:/bbndk/target_10_2_0_1155/qnx6/usr/include/freetype2 -I. -D__QNXNTO__ ../src/applicationui.hpp -o o.le-v7-g/.moc/moc_applicationui.cpp
../src/applicationui.hpp(81): Error: NOTIFY signal 'requestChanged' of property 'startupMode' does not exist in class ApplicationUI.
make[2]: *** [o.le-v7-g/.moc/moc_applicationui.cpp] Error 1
make[1]: *** [debug] Error 2
make: *** [Device-Debug] Error 2
make[2]: Leaving directory `C:/Users/Lucas/momentics-workspace/TestBrowser/arm'
make[1]: Leaving directory `C:/Users/Lucas/momentics-workspace/TestBrowser/arm'

22:03:51 Build Finished (took 4s.995ms)

 

 

and in my .pro file i have this

APP_NAME = MyAppName

CONFIG += qt warn_on cascades10
LIBS += -lbb -lbbdata -lscreen -libbbsystem
include(config.pri)

 

Can someone help please.

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: make: ***[debug] Error 2

The error message seems pretty clear, you are missing the requestChanged function.

 

If you feel you have written it can you include here your header file and the cpp file.

 

A common error is to miss qualifying the function with the class name.


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
New Developer
Posts: 11
Registered: ‎12-08-2012
My Device: Torch 9860
My Carrier: Vodafone uk

Re: make: ***[debug] Error 2

Im now getting this 

 

19:35:46 **** Incremental Build of configuration Device-Debug for project TestBrowser ****
make -j2 Device-Debug 
make -C .//translations -f Makefile update
make[1]: Entering directory `C:/Users/Lucas/momentics-workspace/TestBrowser/translations'
C:/bbndk/host_10_2_0_15/win32/x86/usr/bin/lupdate TestBrowser.pro
Updating 'TestBrowser.ts'...
    Found 0 source text(s) (0 new and 0 already existing)
make[1]: Leaving directory `C:/Users/Lucas/momentics-workspace/TestBrowser/translations'
make -C .//translations -f Makefile release
make[1]: Entering directory `C:/Users/Lucas/momentics-workspace/TestBrowser/translations'
C:/bbndk/host_10_2_0_15/win32/x86/usr/bin/lrelease TestBrowser.pro
Updating 'C:/Users/Lucas/momentics-workspace/TestBrowser/translations/TestBrowser.qm'...
    Generated 1 translation(s) (1 finished and 0 unfinished)
make[1]: Leaving directory `C:/Users/Lucas/momentics-workspace/TestBrowser/translations'
make -C ./arm -f Makefile debug
make[1]: Entering directory `C:/Users/Lucas/momentics-workspace/TestBrowser/arm'
make -f Makefile.Debug
make[2]: Entering directory `C:/Users/Lucas/momentics-workspace/TestBrowser/arm'
qcc -Vgcc_ntoarmv7le -lang-c++ -Wl,-rpath-link,C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/lib -Wl,-rpath-link,C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib -Wl,-rpath-link,C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/qt4/lib -o o.le-v7-g/TestBrowser     -LC:/bbndk/target_10_2_0_1155/qnx6/armle-v7/lib -LC:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib -LC:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib/qt4/lib -LC:/bbndk/target_10_2_0_1155/qnx6//usr/lib/qt4/lib -lbb -lbbdata -lscreen -libbbsystem -lbbcascades -lQtDeclarative -lQtScript -lQtSvg -lQtSql -lsqlite3 -lz -lQtXmlPatterns -lQtGui -lQtNetwork -lsocket -lQtCore -lm -lbps 
cc: no files to process
make[2]: *** [o.le-v7-g/TestBrowser] Error 1
make[1]: *** [debug] Error 2
make: *** [Device-Debug] Error 2
make[2]: Leaving directory `C:/Users/Lucas/momentics-workspace/TestBrowser/arm'
make[1]: Leaving directory `C:/Users/Lucas/momentics-workspace/TestBrowser/arm'

19:35:52 Build Finished (took 5s.395ms)

 

I have basicly used the invoketarget sample, I dont know if you need to see it but here is my applicationui.hpp

 

/*
 * Copyright (c) 2011-2013 BlackBerry Limited.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef ApplicationUI_HPP_
#define ApplicationUI_HPP_

#include <bb/system/InvokeManager>
#include <bb/system/InvokeRequest>

/*!
 * @brief Application object
 *
 *
 */

class ApplicationUI : public QObject
{
    Q_OBJECT

	// The textual representation of the startup mode of the application
    Q_PROPERTY(QString startupMode READ startupMode NOTIFY requestChanged)

    // The values of the incoming invocation request
    Q_PROPERTY(QString source READ source NOTIFY requestChanged)
    Q_PROPERTY(QString target READ target NOTIFY requestChanged)
    Q_PROPERTY(QString action READ action NOTIFY requestChanged)
    Q_PROPERTY(QString mimeType READ mimeType NOTIFY requestChanged)
    Q_PROPERTY(QString uri READ uri NOTIFY requestChanged)
    Q_PROPERTY(QString data READ data NOTIFY requestChanged)

    // The textual representation of the card status
    Q_PROPERTY(QString status READ status NOTIFY statusChanged)


public:
    Q_INVOKABLE QString formatURLStuff(const QString &msg);
    Q_INVOKABLE QString getValueFor(const QString &objectName, const QString &defaultValue);
    Q_INVOKABLE void saveValueFor(const QString &objectName, const QString &inputValue);
    Q_INVOKABLE void addQuickLink(const QString &linkName, const QString &linkUrl);
    ApplicationUI(QObject *parent = 0);
	void initFullUI();
    virtual ~ApplicationUI() { }
private slots:
    void onInvokeRequest(const bb::system::InvokeRequest&);

signals:
	void requestChanged();
	void statusChanged();
private:
    // The accessor methods of the properties
    QString startupMode() const;
    QString source() const;
    QString target() const;
    QString action() const;
    QString mimeType() const;
    QString uri() const;
    QString data() const;
    QString status() const;

    // The central class to manage invocations
    bb::system::InvokeManager *m_invokeManager;

    // The property values
    QString m_startupMode;
    QString m_source;
    QString m_target;
    QString m_action;
    QString m_mimeType;
    QString m_uri;
    QString m_data;
    QString m_status;
};

#endif /* ApplicationUI_HPP_ */

  and my .cpp file

 

/*
 * Copyright (c) 2011-2013 BlackBerry Limited.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "applicationui.hpp"

#include <bb/cascades/AbstractPane>
#include <bb/cascades/Application>
#include <bb/cascades/QmlDocument>

using namespace bb::cascades;
using namespace bb::system;

ApplicationUI::ApplicationUI(QObject *parent) :
        QObject(parent), m_invokeManager(new InvokeManager(this))
{
	// Listen to incoming invocation requests
	    bool ok = connect(m_invokeManager, SIGNAL(invoked(const bb::system::InvokeRequest&)),
	                      this, SLOT(onInvokeRequest(const bb::system::InvokeRequest&)));
	    Q_ASSERT(ok);

	    m_source = m_target = m_action = m_mimeType = m_uri = m_data = m_status =
	            tr("--");

	    // Initialize properties with default values
	    switch (m_invokeManager->startupMode()) {
	    case ApplicationStartupMode::LaunchApplication:
	        m_startupMode = tr("Launch");
	        initFullUI();
	        break;
	    case ApplicationStartupMode::InvokeApplication:
	        // Wait for invoked signal to determine and initialize the appropriate UI
	        m_startupMode = tr("Invoke");
	        break;
	    case ApplicationStartupMode::InvokeCard:
	    	break;
	    case ApplicationStartupMode::InvokeViewer:
	    	break;
	    }

	    // Create the UI
}

void ApplicationUI::onInvokeRequest(const InvokeRequest& request){
	m_source =
	            QString::fromLatin1("%1 (%2)").arg(request.source().installId()).arg(
	                    request.source().groupId());
	    m_target = request.target();
	    m_action = request.action();
	    m_mimeType = request.mimeType();
	    m_uri = request.uri().toString();
	    m_data = QString::fromUtf8(request.data());

	    initFullUI();
}

void ApplicationUI::initFullUI() {
    // initial load
	// Create scene document from main.qml asset, the parent is set
    // to ensure the document gets destroyed properly at shut down.
    QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
    qml->setContextProperty("OhHaiBrowser", this);
	// Create root object for the UI
    AbstractPane *root = qml->createRootObject<AbstractPane>();
    // Set created root object as the application scene
    Application::instance()->setScene(root);
}

QString App::startupMode() const {
    return m_startupMode;
}

QString App::source() const {
    return m_source;
}

QString App::target() const {
    return m_target;
}

QString App::action() const {
    return m_action;
}

QString App::mimeType() const {
    return m_mimeType;
}

QString App::uri() const {
    return m_uri;
}

QString App::data() const {
    return m_data;
}

QString App::status() const {
    return m_status;
}

QString ApplicationUI::formatURLStuff(const QString &msg) {

	QUrl url = msg;
	url = url.toEncoded();
	if (url.scheme().isEmpty()) {
		//if there is a ., let's guess it's an URL
		if (url.toString().contains(".")) {
			url.setScheme("http");
		}
		//if there is no scheme	and no dot search
		else {
			url = "Search";
		}
	}
	return url.toString();
}

QString ApplicationUI::getValueFor(const QString &objectName, const QString &defaultValue)
{
    QSettings settings;

    // If no value has been saved, return the default value.
    if (settings.value(objectName).isNull()) {
        return defaultValue;
    }

    // Otherwise, return the value stored in the settings object.
    return settings.value(objectName).toString();
}

void ApplicationUI::saveValueFor(const QString &objectName, const QString &inputValue)
{
    // A new value is saved to the application settings object.
    QSettings settings;
    settings.setValue(objectName, QVariant(inputValue));
}

 

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: make: ***[debug] Error 2

I think your .pro file has probably got messed up try doing a clean build.

If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.